Skip to content

Commit

Permalink
Merge pull request #6647 from filecoin-project/fix/nil-failedsectors-map
Browse files Browse the repository at this point in the history
commit batch: Initialize the FailedSectors map
  • Loading branch information
magik6k authored Jul 1, 2021
2 parents 6a5b94c + 88bb9f4 commit 98a4be4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions extern/storage-sealing/commit_batch.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,9 @@ func (b *CommitBatcher) processBatch(cfg sealiface.Config) ([]sealiface.CommitBa

total := len(b.todo)

var res sealiface.CommitBatchRes
res := sealiface.CommitBatchRes{
FailedSectors: map[abi.SectorNumber]string{},
}

params := miner5.ProveCommitAggregateParams{
SectorNumbers: bitfield.New(),
Expand Down Expand Up @@ -356,7 +358,8 @@ func (b *CommitBatcher) processIndividually() ([]sealiface.CommitBatchRes, error

for sn, info := range b.todo {
r := sealiface.CommitBatchRes{
Sectors: []abi.SectorNumber{sn},
Sectors: []abi.SectorNumber{sn},
FailedSectors: map[abi.SectorNumber]string{},
}

mcid, err := b.processSingle(mi, sn, info, tok)
Expand Down

0 comments on commit 98a4be4

Please sign in to comment.