Merge pull request #10300 from filecoin-project/steb/fix-eth-nonce

fix: eth: return the correct nonce from EthGetTransactionCount
This commit is contained in:
Aayush Rajasekaran
2023-02-17 14:45:45 -05:00
committed by GitHub
6 changed files with 57 additions and 3 deletions
@@ -48,6 +48,7 @@ type State interface {
cbor.Marshaler
Nonce() (uint64, error)
IsAlive() (bool, error)
GetState() interface{}
GetBytecode() ([]byte, error)
+1
View File
@@ -48,6 +48,7 @@ type State interface {
cbor.Marshaler
Nonce() (uint64, error)
IsAlive() (bool, error)
GetState() interface{}
GetBytecode() ([]byte, error)
@@ -4,6 +4,8 @@ import (
"github.com/ipfs/go-cid"
"github.com/filecoin-project/lotus/chain/actors/adt"
"github.com/filecoin-project/lotus/chain/actors/adt"
"github.com/filecoin-project/go-state-types/abi"
evm{{.v}} "github.com/filecoin-project/go-state-types/builtin{{.import}}evm"
)
@@ -40,6 +42,10 @@ func (s *state{{.v}}) Nonce() (uint64, error) {
return s.State.Nonce, nil
}
func (s *state{{.v}}) IsAlive() (bool, error) {
return s.State.Tombstone == nil, nil
}
func (s *state{{.v}}) GetState() interface{} {
return &s.State
}
+4
View File
@@ -41,6 +41,10 @@ func (s *state10) Nonce() (uint64, error) {
return s.State.Nonce, nil
}
func (s *state10) IsAlive() (bool, error) {
return s.State.Tombstone == nil, nil
}
func (s *state10) GetState() interface{} {
return &s.State
}