Merge branch 'master' into feat/chainwatch-pg
This commit is contained in:
commit
a9ca6d4065
@ -5,7 +5,7 @@ import "fmt"
|
||||
var CurrentCommit string
|
||||
|
||||
// BuildVersion is the local build version, set by build system
|
||||
const BuildVersion = "0.1.5"
|
||||
const BuildVersion = "0.1.6"
|
||||
|
||||
var UserVersion = BuildVersion + CurrentCommit
|
||||
|
||||
|
@ -24,6 +24,7 @@ import (
|
||||
)
|
||||
|
||||
const MaxSectors = 1 << 48
|
||||
const RLEMax = 100e3
|
||||
|
||||
type StorageMinerActor struct{}
|
||||
|
||||
@ -576,6 +577,17 @@ func (sma StorageMinerActor) SubmitFallbackPoSt(act *types.Actor, vmctx types.VM
|
||||
return nil, aerrors.HandleExternalError(lerr, "could not load proving set node")
|
||||
}
|
||||
|
||||
{
|
||||
c, nerr := self.FaultSet.Count()
|
||||
if nerr != nil {
|
||||
return nil, aerrors.Absorb(nerr, 6, "invalid bitfield")
|
||||
}
|
||||
|
||||
if c > RLEMax {
|
||||
return nil, aerrors.Newf(7, "too many items in bitfield: %d", c)
|
||||
}
|
||||
}
|
||||
|
||||
faults, nerr := self.FaultSet.AllMap()
|
||||
if nerr != nil {
|
||||
return nil, aerrors.Absorb(err, 5, "RLE+ invalid")
|
||||
@ -1147,6 +1159,16 @@ func onSuccessfulPoStV1(self *StorageMinerActorState, vmctx types.VMContext) aer
|
||||
return aerrors.HandleExternalError(nerr, "failed to load proving set")
|
||||
}
|
||||
|
||||
{
|
||||
c, nerr := self.FaultSet.Count()
|
||||
if nerr != nil {
|
||||
return aerrors.Absorb(nerr, 2, "invalid bitfield")
|
||||
}
|
||||
if c > RLEMax {
|
||||
return aerrors.Newf(3, "too many items in bitfield: %d", c)
|
||||
}
|
||||
}
|
||||
|
||||
faults, nerr := self.FaultSet.All()
|
||||
if nerr != nil {
|
||||
return aerrors.Absorb(nerr, 1, "invalid bitfield (fatal?)")
|
||||
|
Loading…
Reference in New Issue
Block a user