ouroboros-network icon indicating copy to clipboard operation
ouroboros-network copied to clipboard

Let the thread which fetched a TX add it to the mempool

Open karknu opened this issue 4 months ago • 0 comments

Description

Previously all peers that had the TXid of a downloaded TX would attempt to add it to the mempool (a rather costly operation).

This patch moves the addition to the mempool to the Server's CollectTxs state. Which means that the downloaded TXs is only added by the thread that actually downloaded it.

The legacy TX submission protocol has been left as is.

Checklist

Quality

  • [ ] Commit sequence makes sense and have useful messages, see ref.
  • [ ] New tests are added and existing tests are updated.
  • [ ] Self-reviewed the PR.

Maintenance

  • [ ] Linked an issue or added the PR to the current sprint of ouroboros-network project.
  • [ ] Added labels.
  • [ ] Updated changelog files.
  • [ ] The documentation has been properly updated, see ref.

karknu avatar Oct 04 '24 10:10 karknu