Skip to content

Commit 7f8aa12

Browse files
committed
fix: rm debug
1 parent 9f608d6 commit 7f8aa12

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

actors/actors.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ import (
2121
_ "github.com/filecoin-project/lotus/build"
2222
)
2323

24+
const LatestVersion = network.Version26
25+
2426
type ActorCidMap map[string]cid.Cid
2527
type BuiltinActorsMetadata struct {
2628
Network string
@@ -134,8 +136,8 @@ func loadActorCids(currentNetworkVersion network.Version, loadAllActorVersions b
134136

135137
if loadAllActorVersions {
136138
zap.S().Info("loading all actor versions")
137-
networkVersions = make([]network.Version, network.Version26+1)
138-
for i := network.Version0; i <= network.Version26; i++ {
139+
networkVersions = make([]network.Version, LatestVersion+1)
140+
for i := network.Version0; i <= LatestVersion; i++ {
139141
networkVersions[i] = i
140142
}
141143
} else {
@@ -154,20 +156,19 @@ func loadActorCids(currentNetworkVersion network.Version, loadAllActorVersions b
154156
actorCids, err := lotusApi.StateActorCodeCIDs(context.Background(), version)
155157
if err != nil {
156158
zap.S().Errorf("worker %d: error loading actor cids for version %d: %s", i, version, err.Error())
159+
actorCids = ActorCidMap{}
157160
}
158161
actorCidsChannel <- map[network.Version]ActorCidMap{version: actorCids}
159162
}
160163
}(i)
161164
}
162165

163166
for _, networkVersion := range networkVersions {
164-
fmt.Printf("main: sending version %d to worker\n", networkVersion)
165167
versionChannel <- networkVersion
166168
}
167169

168170
var received int
169171
for actorCids := range actorCidsChannel {
170-
fmt.Printf("received actor cids for version %d\n", received+1)
171172
for version, actors := range actorCids {
172173
actorCidsMap[version] = actors
173174
}

0 commit comments

Comments
 (0)