From c4d10bc44e11d75a05c625559b62e912d6d0a18e Mon Sep 17 00:00:00 2001 From: Anton Evangelatov Date: Fri, 4 Jun 2021 16:49:32 +0200 Subject: [PATCH] apply messagepool.NewProviderLite to lite nodes --- chain/messagepool/messagepool.go | 3 +++ node/builder_chain.go | 1 + node/test/builder.go | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/chain/messagepool/messagepool.go b/chain/messagepool/messagepool.go index 0180d1abf..2201b5d83 100644 --- a/chain/messagepool/messagepool.go +++ b/chain/messagepool/messagepool.go @@ -11,6 +11,7 @@ import ( "sync" "time" + "github.com/davecgh/go-spew/spew" "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/big" "github.com/filecoin-project/go-state-types/crypto" @@ -969,6 +970,8 @@ func (mp *MessagePool) getNonceLocked(ctx context.Context, addr address.Address, } func (mp *MessagePool) getStateNonce(addr address.Address, ts *types.TipSet) (uint64, error) { + spew.Dump(addr) + act, err := mp.api.GetActorAfter(addr, ts) if err != nil { return 0, err diff --git a/node/builder_chain.go b/node/builder_chain.go index f6d19579a..17a1666c4 100644 --- a/node/builder_chain.go +++ b/node/builder_chain.go @@ -127,6 +127,7 @@ var ChainNode = Options( // Lite node API ApplyIf(isLiteNode, + Override(new(messagepool.Provider), messagepool.NewProviderLite), Override(new(messagesigner.MpoolNonceAPI), From(new(modules.MpoolNonceAPI))), Override(new(full.ChainModuleAPI), From(new(api.Gateway))), Override(new(full.GasModuleAPI), From(new(api.Gateway))), diff --git a/node/test/builder.go b/node/test/builder.go index 4dc23c0e9..0c704bad3 100644 --- a/node/test/builder.go +++ b/node/test/builder.go @@ -579,7 +579,7 @@ func mockSbBuilderOpts(t *testing.T, fullOpts []test.FullNodeOpts, storage []tes }), node.Override(new(ffiwrapper.Verifier), mock.MockVerifier), node.Override(new(ffiwrapper.Prover), mock.MockProver), - // node.Unset(new(*sectorstorage.Manager)), + node.Unset(new(*sectorstorage.Manager)), opts, ))