HomePhabricator

[mempool] sanity check that all unbroadcast txns are in mempool

Description

[mempool] sanity check that all unbroadcast txns are in mempool

Summary:

  • before reattempting broadcast for unbroadcast txns, check they are in mempool and remove if not
  • this protects from memory leaks and network spam just in case unbroadcast set (incorrectly) has extra txns
  • check that tx is in mempool before adding to unbroadcast set to try to prevent this from happening

This is a backport of Core PR18895 [3/3]
https://github.com/bitcoin/bitcoin/pull/18895/commits/9d3f7eb9860254eb787ebe2734fd6a26bcf365c1
Depends on D9024

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D9025

Details

Provenance
gzhao408 <gzhao408@berkeley.edu>Authored on Jan 22 2021, 09:43
PiRKCommitted on Jan 22 2021, 09:43
PiRKPushed on Jan 22 2021, 09:43
Reviewer
Restricted Project
Differential Revision
D9025: [mempool] sanity check that all unbroadcast txns are in mempool
Parents
rABCe275c3dc804a: [rpc] add unbroadcast info to mempool entries and getmempoolinfo
Branches
Unknown
Tags
Unknown