From b972b519fa1a8e17db569affd38bf9a59405ae32 Mon Sep 17 00:00:00 2001 From: frrist Date: Mon, 27 Apr 2020 19:57:48 -0700 Subject: [PATCH] require success in reward actor send reward --- actors/builtin/reward/reward_actor.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/actors/builtin/reward/reward_actor.go b/actors/builtin/reward/reward_actor.go index 741107ca9..07bc0d9de 100644 --- a/actors/builtin/reward/reward_actor.go +++ b/actors/builtin/reward/reward_actor.go @@ -88,10 +88,11 @@ func (a Actor) AwardBlockReward(rt vmr.Runtime, params *AwardBlockRewardParams) }).(abi.TokenAmount) _, code := rt.Send(minerAddr, builtin.MethodsMiner.AddLockedFund, &rewardPayable, rewardPayable) + builtin.RequireSuccess(rt, code, "failed to send reward to miner: %s", minerAddr) // Burn the penalty amount. _, code = rt.Send(builtin.BurntFundsActorAddr, builtin.MethodSend, nil, penalty) - builtin.RequireSuccess(rt, code, "failed to send penalty to BurntFundsActor") + builtin.RequireSuccess(rt, code, "failed to send penalty to burnt funds actor") return nil }