From f357becc8afc2eca213b239decf0147686b01d4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Mon, 23 Sep 2019 11:45:22 +0200 Subject: [PATCH] statetree: add actor to actcache in SetActor --- chain/state/statetree.go | 2 ++ chain/vm/vm.go | 3 +++ 2 files changed, 5 insertions(+) diff --git a/chain/state/statetree.go b/chain/state/statetree.go index 8a0f1ca96..0fa9f1490 100644 --- a/chain/state/statetree.go +++ b/chain/state/statetree.go @@ -62,6 +62,8 @@ func (st *StateTree) SetActor(addr address.Address, act *types.Actor) error { } } + st.actorcache[addr] = act + return st.root.Set(context.TODO(), string(addr.Bytes()), act) } diff --git a/chain/vm/vm.go b/chain/vm/vm.go index 7a2b05a10..251cd358e 100644 --- a/chain/vm/vm.go +++ b/chain/vm/vm.go @@ -468,6 +468,9 @@ func (vm *VM) ApplyMessage(ctx context.Context, msg *types.Message) (*ApplyRet, if aerrors.IsFatal(actorErr) { return nil, xerrors.Errorf("fatal error: %w", actorErr) } + if actorErr != nil { + log.Warn("Send actor error: %s", actorErr) + } var errcode uint8 var gasUsed types.BigInt