[go: up one dir, main page]

etherlink: Tx queue can be queried for next next gap nonce

Checklist

  • Provide automatic testing.
  • Add an item in the changelog

What

meta-issue for the stacked MR: #7785

Now the TX queue can be queried to return the next available nonce of a user. This also takes into acount transactions that where alredy forwarded by the tx_queue.

Why

Because it's an important part of the get_transaction_count RPC logic. It allows to query the next nonce to use.

How

I've added a bitset to manage the nonce of current transaction in the tx_queue. The other solution would be to fold over transactions when requested, but it's more costly. This approches make the query not dependant of the tx queue current size.

Manually testing the MR

Check the unit test in try to query the json rpc get_transaction_count

Edited by Sylvain R.

Merge request reports

Loading