don't ignore transfer error in delete actor

This commit is contained in:
frrist 2020-05-13 14:46:16 -07:00
parent 0c2e4e2d4f
commit 9305eca97c

View File

@ -271,8 +271,9 @@ func (rt *Runtime) DeleteActor(addr address.Address) {
panic(aerrors.Fatalf("failed to get actor: %s", err)) panic(aerrors.Fatalf("failed to get actor: %s", err))
} }
if !act.Balance.IsZero() { if !act.Balance.IsZero() {
// TODO don't ignore this error? if err := rt.vm.transfer(rt.Message().Receiver(), builtin.BurntFundsActorAddr, act.Balance); err != nil {
rt.vm.transfer(rt.Message().Receiver(), builtin.BurntFundsActorAddr, act.Balance) panic(aerrors.Fatalf("failed to transfer balance to burnt funds actor: %s", err))
}
} }
if err := rt.state.DeleteActor(rt.Message().Receiver()); err != nil { if err := rt.state.DeleteActor(rt.Message().Receiver()); err != nil {