Skip to content
This repository has been archived by the owner on Jun 6, 2023. It is now read-only.

Commit

Permalink
require success in reward actor send reward (#331)
Browse files Browse the repository at this point in the history
  • Loading branch information
frrist authored and aarshkshah1992 committed Jun 29, 2020
1 parent 0d5ff4a commit c9f11e2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion actors/builtin/reward/reward_actor.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit c9f11e2

Please sign in to comment.