Skip to content

Commit

Permalink
fix mismatch hash key of pendingtx in mempool
Browse files Browse the repository at this point in the history
  • Loading branch information
KamiD committed Jan 16, 2022
1 parent bbfe781 commit 30aa1e0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ GithubTop=github.com



Version=v1.1.3
Version=v1.1.4.1
CosmosSDK=v0.39.2
Tendermint=v0.33.9
Iavl=v0.14.3
Expand Down
5 changes: 3 additions & 2 deletions libs/tendermint/mempool/clist_mempool.go
Original file line number Diff line number Diff line change
Expand Up @@ -1105,8 +1105,9 @@ func (nopTxCache) Remove(types.Tx) {}
//--------------------------------------------------------------------------------

// txKey is the fixed length array sha256 hash used as the key in maps.
func txKey(tx types.Tx) [sha256.Size]byte {
return sha256.Sum256(tx)
func txKey(tx types.Tx) (retHash [sha256.Size]byte) {
copy(retHash[:], tx.Hash(types.GetVenusHeight())[:sha256.Size])
return
}

// txID is the hex encoded hash of the bytes as a types.Tx.
Expand Down

0 comments on commit 30aa1e0

Please sign in to comment.