From a47b063a24039ae9d86bab93f3ee26d7928c25ad Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Thu, 22 Oct 2020 17:53:03 -0700 Subject: [PATCH] Fix duplicate nonce test StateGetActor now gets the actor at the tipset parent state. --- chain/sync_test.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/chain/sync_test.go b/chain/sync_test.go index 559a73bf5..9570eda32 100644 --- a/chain/sync_test.go +++ b/chain/sync_test.go @@ -573,11 +573,14 @@ func TestDuplicateNonce(t *testing.T) { base := tu.g.CurTipset + // Get the banker from computed tipset state, not the parent. + st, _, err := tu.g.StateManager().TipSetState(context.TODO(), base.TipSet()) + require.NoError(t, err) + ba, err := tu.g.StateManager().LoadActorRaw(context.TODO(), tu.g.Banker(), st) + require.NoError(t, err) + // Produce a message from the banker to the rcvr makeMsg := func(rcvr address.Address) *types.SignedMessage { - - ba, err := tu.nds[0].StateGetActor(context.TODO(), tu.g.Banker(), base.TipSet().Key()) - require.NoError(t, err) msg := types.Message{ To: rcvr, From: tu.g.Banker(),