mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-16 18:00:46 +00:00
remove key with empty value from map txs in func NewOrderTransactionByNonce
This commit is contained in:
parent
559bb4f7f5
commit
e097f2b0df
1 changed files with 1 additions and 0 deletions
|
|
@ -305,6 +305,7 @@ func NewOrderTransactionByNonce(signer OrderSigner, txs map[common.Address]Order
|
||||||
heads := make(OrderTxByNonce, 0, len(txs))
|
heads := make(OrderTxByNonce, 0, len(txs))
|
||||||
for from, accTxs := range txs {
|
for from, accTxs := range txs {
|
||||||
if len(accTxs) == 0 {
|
if len(accTxs) == 0 {
|
||||||
|
delete(txs, from)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
heads = append(heads, accTxs[0])
|
heads = append(heads, accTxs[0])
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue