Merge pull request #10300 from filecoin-project/steb/fix-eth-nonce
fix: eth: return the correct nonce from EthGetTransactionCount
This commit is contained in:
@@ -48,6 +48,7 @@ type State interface {
|
||||
cbor.Marshaler
|
||||
|
||||
Nonce() (uint64, error)
|
||||
IsAlive() (bool, error)
|
||||
GetState() interface{}
|
||||
|
||||
GetBytecode() ([]byte, error)
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Generated
+4
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user