Page MenuHomePhabricator

only load unbroadcast tx if it exists in loaded mempool
ClosedPublic

Authored by PiRK on Jul 19 2022, 12:52.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABCa1109e55df5f: only load unbroadcast tx if it exists in loaded mempool
Summary

The unbroadcast_txids set only contains the txid. If for some reason a tx gets rejected when loading the mempool from the database, there is no point in loading the corresponding txid in the unbroadcast set, as we don't have the tx any longer for broadcasting.

This is a partial backport of core#18044 and core#19879
https://github.com/bitcoin/bitcoin/pull/18044/commits/c7eb6b4f1fe5bd76388a023529977674534334a7
https://github.com/bitcoin/bitcoin/pull/19879/commits/cb79b9dbf4cd06e17c8c65b36bf15c3ea2641de4

Test Plan

ninja all check-all

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

PiRK requested review of this revision.Jul 19 2022, 12:52

include relevant minor changes from core#19879: comment improvements and don't use an unnecessary intermediate variable added_tx

PiRK edited the summary of this revision. (Show Details)

remove blank line

This revision is now accepted and ready to land.Jul 19 2022, 14:24