From c2fdca470d5e228ce4f321047889eeb20fc76cd1 Mon Sep 17 00:00:00 2001 From: Jakub Sztandera Date: Tue, 14 Jan 2020 13:22:41 +0100 Subject: [PATCH] Add additional checks to ACF Fixes https://github.com/filecoin-project/lotus/issues/1074 Signed-off-by: Jakub Sztandera --- chain/actors/actor_storagepower.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/chain/actors/actor_storagepower.go b/chain/actors/actor_storagepower.go index d3c2ad674..ab174d91e 100644 --- a/chain/actors/actor_storagepower.go +++ b/chain/actors/actor_storagepower.go @@ -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") }