Skip to content

Commit

Permalink
Merge pull request #402 from gzliudan/XDP-02
Browse files Browse the repository at this point in the history
remove key with empty value from map txs in function NewOrderTransactionByNonce
  • Loading branch information
gzliudan committed Jan 26, 2024
2 parents 7403063 + e097f2b commit 0d7dd86
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions core/types/order_transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ func NewOrderTransactionByNonce(signer OrderSigner, txs map[common.Address]Order
heads := make(OrderTxByNonce, 0, len(txs))
for from, accTxs := range txs {
if len(accTxs) == 0 {
delete(txs, from)
continue
}
heads = append(heads, accTxs[0])
Expand Down

0 comments on commit 0d7dd86

Please sign in to comment.