Skip to content

Transaction Pool Polishing

David Vorick requested to merge wallet-updates into master

Order of doing:

  1. Review this PR, make comments, I'll fix stuff
  2. I'll make another PR into this PR containing code that will fix the build. Idk how much coding that will take
  3. Review that PR, make comments, I'll fix stuff
  4. Merge that PR into this PR
  5. Merge this PR into master.

it's a little complicated but I didn't want this to turn into a monster PR. Despite the branch name of wallet-updates, the majority of the work here is on the transaction pool. I feel like the transaction pool is very solid/beautiful at this point. Still rather light on testing, but overall it's well documented, pretty simple in construction, and has been designed a lot more carefully than ever in the past.

The amount of times that the transaction pool grabs a lock on the state has been substantially reduced, I think it only grabs a lock in 2 places right now. Also, the test suite now follows much stricter synchronization. The miner also synchronizes much more strictly to the transaction pool.

There is now an api call to see which transactions are in the transaction pool. We probably won't use it much, and so it's just a raw JSON dump but even that should be useful to us.

A good deal of code has been removed. The diffs indicate that only 80 lines have been removed, but actually the amount of documentation has gone up substantially. Many of the +'s are comments.

This PR broke the wallet and siad tests. All of the transaction pool tests however are still around, and work well. My second PR (parts 3-4) will fix the testing for the wallet and siad.

Merge request reports