nit: actually, don't use blocks
This commit is contained in:
parent
49cd428c43
commit
6c0f4cbd74
@ -369,16 +369,12 @@ func (a *EthModule) EthGetTransactionCount(ctx context.Context, sender ethtypes.
|
||||
}
|
||||
|
||||
// First, handle the case where the "sender" is an EVM actor.
|
||||
{
|
||||
actor, err := a.StateManager.LoadActor(ctx, addr, ts)
|
||||
if err != nil {
|
||||
if actor, err := a.StateManager.LoadActor(ctx, addr, ts); err != nil {
|
||||
if xerrors.Is(err, types.ErrActorNotFound) {
|
||||
return 0, nil
|
||||
}
|
||||
return 0, xerrors.Errorf("failed to lookup contract %s: %w", sender, err)
|
||||
}
|
||||
|
||||
if builtinactors.IsEvmActor(actor.Code) {
|
||||
} else if builtinactors.IsEvmActor(actor.Code) {
|
||||
evmState, err := builtinevm.Load(a.Chain.ActorStore(ctx), actor)
|
||||
if err != nil {
|
||||
return 0, xerrors.Errorf("failed to load evm state: %w", err)
|
||||
@ -391,7 +387,6 @@ func (a *EthModule) EthGetTransactionCount(ctx context.Context, sender ethtypes.
|
||||
nonce, err := evmState.Nonce()
|
||||
return ethtypes.EthUint64(nonce), err
|
||||
}
|
||||
}
|
||||
|
||||
nonce, err := a.Mpool.GetNonce(ctx, addr, ts.Key())
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user