Merge pull request #1075 from filecoin-project/fix/acf-check

Add additional checks to ACF
This commit is contained in:
Jakub Sztandera 2020-01-14 13:42:33 +01:00 committed by GitHub
commit 1924eb1471
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -5,7 +5,7 @@ import "fmt"
var CurrentCommit string
// BuildVersion is the local build version, set by build system
const BuildVersion = "0.2.0"
const BuildVersion = "0.2.1"
var UserVersion = BuildVersion + CurrentCommit

View File

@ -130,6 +130,10 @@ type ArbitrateConsensusFaultParams struct {
}
func (spa StoragePowerActor) ArbitrateConsensusFault(act *types.Actor, vmctx types.VMContext, params *ArbitrateConsensusFaultParams) ([]byte, ActorError) {
if params == nil || params.Block1 == nil || params.Block2 == nil {
return nil, aerrors.New(1, "failed to parse params")
}
if params.Block1.Miner != params.Block2.Miner {
return nil, aerrors.New(2, "blocks must be from the same miner")
}