mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-28 14:47:16 +00:00
07fa94278f
In context of https://github.com/ledgerwatch/erigon/issues/5694, this PR fixes the tx ordering logic in the txpool. Also, a relevant change in erigon is made here: https://github.com/ledgerwatch/erigon/pull/6051. When the mining module used to query the best transactions, the response of transactions weren't sorted according to nonce (for same sender address). This caused the execution to fail (except 1). The txpool orders the transactions using this underlying `better()` and `worse()` functions. The `better()` function didn't have a nonce check for the pending pool, while the `worse()` function had. This PR adds a check which would compare and put a transaction with lower nonce ahead. Moreover, on further investigation, these checks were applied for all types of transactions. It only makes sense compare the nonce for transactions which has same sender account. Hence, this PR also adds an additional check along with. |
||
---|---|---|
.github/workflows | ||
aggregator | ||
bptree | ||
chain | ||
commitment | ||
common | ||
compress | ||
crypto | ||
direct | ||
etl | ||
gointerfaces | ||
kv | ||
mmap | ||
patricia | ||
pedersen_hash | ||
recsplit | ||
rlp | ||
sais | ||
state | ||
txpool | ||
types | ||
.gitignore | ||
.golangci.yml | ||
go.mod | ||
go.sum | ||
LICENSE | ||
Makefile | ||
README.md | ||
rules.go | ||
tools.go |
erigon-lib
Dependencies of Erigon project, rewritten from scratch and licensed under Apache 2.0