Skip to content

Commit

Permalink
Merge PR: fix hardhat get wrong nonce (#2897)
Browse files Browse the repository at this point in the history
* fix hardhat get wrong nonce

* bump version to v1.6.7.4
  • Loading branch information
xiangjianmeng authored Dec 29, 2022
1 parent 7f2e274 commit 9caef58
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ IGNORE_CHECK_GO=false
install_rocksdb_version:=$(ROCKSDB_VERSION)


Version=v1.6.7.3
Version=v1.6.7.4
CosmosSDK=v0.39.2
Tendermint=v0.33.9
Iavl=v0.14.3
Expand Down
14 changes: 7 additions & 7 deletions app/rpc/namespaces/eth/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -505,14 +505,14 @@ func (api *PublicEthereumAPI) GetTransactionCount(address common.Address, blockN
monitor := monitor.GetMonitor("eth_getTransactionCount", api.logger, api.Metrics).OnBegin()
defer monitor.OnEnd("address", address, "block number", blockNrOrHash)

var err error
blockNum := rpctypes.LatestBlockNumber
blockNum, err := api.backend.ConvertToBlockNumber(blockNrOrHash)
if err != nil {
return nil, err
}

// do not support block number param when node is pruning everything
if !api.backend.PruneEverything() {
blockNum, err = api.backend.ConvertToBlockNumber(blockNrOrHash)
if err != nil {
return nil, err
}
if api.backend.PruneEverything() && blockNum != rpctypes.PendingBlockNumber {
blockNum = rpctypes.LatestBlockNumber
}

clientCtx := api.clientCtx
Expand Down

0 comments on commit 9caef58

Please sign in to comment.