Merge pull request #2788 from filecoin-project/fix/chainwatch-miner-panic

fix(chainwatch): Miner partition processing panics on nil bitfiled
This commit is contained in:
Łukasz Magiera 2020-08-03 20:43:00 +02:00 committed by GitHub
commit 83718c6165
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -776,10 +776,10 @@ func (p *Processor) diffPartition(prevPart, curPart miner.Partition) (*Partition
} }
expired := abi.NewBitField() expired := abi.NewBitField()
var bf *abi.BitField var bf abi.BitField
if err := terminatedEarlyArr.ForEach(bf, func(i int64) error { if err := terminatedEarlyArr.ForEach(&bf, func(i int64) error {
// expired = all removals - termination // expired = all removals - termination
expirations, err := bitfield.SubtractBitField(allRemovedSectors, bf) expirations, err := bitfield.SubtractBitField(allRemovedSectors, &bf)
if err != nil { if err != nil {
return err return err
} }