mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 18:02:24 +00:00
eth/gasprice: Make a copy of transaction pointers before sorting
This commit is contained in:
parent
cd85458aa2
commit
26f303f3ed
1 changed files with 3 additions and 1 deletions
|
|
@ -167,7 +167,9 @@ func (gpo *Oracle) getBlockPrices(ctx context.Context, signer types.Signer, bloc
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
txs := block.Transactions()
|
blockTxs := block.Transactions()
|
||||||
|
txs := make([]*types.Transaction, len(blockTxs))
|
||||||
|
copy(txs, blockTxs)
|
||||||
sort.Sort(transactionsByGasPrice(txs))
|
sort.Sort(transactionsByGasPrice(txs))
|
||||||
|
|
||||||
for _, tx := range txs {
|
for _, tx := range txs {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue