apply messagepool.NewProviderLite to lite nodes

This commit is contained in:
Anton Evangelatov 2021-06-04 16:49:32 +02:00
parent 6f125cc129
commit c4d10bc44e
3 changed files with 5 additions and 1 deletions

View File

@ -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

View File

@ -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))),

View File

@ -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,
))