Merge pull request #402 from gzliudan/XDP-02

remove key with empty value from map txs in function NewOrderTransactionByNonce
This commit is contained in:
Daniel Liu 2024-01-26 10:34:33 +08:00 committed by GitHub
commit 0d7dd867b7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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])