mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-18 22:35:39 +01:00
Merge bitcoin/bitcoin#26551: p2p: Track orphans by who provided them
c58c249a5bnet_processing: indicate more work to do when orphans are ready to reconsider (Anthony Towns)ecb0a3e425net_processing: Don't process tx after processing orphans (Anthony Towns)c583775706net_processing: only process orphans before messages (Anthony Towns)be2304676btxorphange: Drop redundant originator arg from GetTxToReconsider (Anthony Towns)a4fe09973atxorphanage: index workset by originating peer (Anthony Towns) Pull request description: We currently process orphans by assigning them to the peer that provided a missing parent; instead assign them to the peer that provided the orphan in the first place. This prevents a peer from being able to marginally delay another peer's transactions and also simplifies the internal API slightly. Because we're now associating orphan processing with the peer that provided the orphan originally, we no longer process orphans immediately after receiving the parent, but defer until a future call to `ProcessMessage`. Based on #26295 ACKs for top commit: naumenkogs: utACKc58c249a5bglozow: ACKc58c249a5bmzumsande: Code Review ACKc58c249a5bTree-SHA512: 3186c346f21e60440266a2a80a9d23d7b96071414e14b2b3bfe50457c04c18b1eab109c3d8c2a7726a6b10a2eda1f0512510a52c102da112820a26f5d96f12de
This commit is contained in:
@@ -85,16 +85,12 @@ FUZZ_TARGET_INIT(txorphan, initialize_orphanage)
|
||||
CallOneOf(
|
||||
fuzzed_data_provider,
|
||||
[&] {
|
||||
orphanage.AddChildrenToWorkSet(*tx, peer_id);
|
||||
orphanage.AddChildrenToWorkSet(*tx);
|
||||
},
|
||||
[&] {
|
||||
{
|
||||
NodeId originator;
|
||||
bool more = true;
|
||||
CTransactionRef ref = orphanage.GetTxToReconsider(peer_id, originator, more);
|
||||
if (!ref) {
|
||||
Assert(!more);
|
||||
} else {
|
||||
CTransactionRef ref = orphanage.GetTxToReconsider(peer_id);
|
||||
if (ref) {
|
||||
bool have_tx = orphanage.HaveTx(GenTxid::Txid(ref->GetHash())) || orphanage.HaveTx(GenTxid::Wtxid(ref->GetHash()));
|
||||
Assert(have_tx);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user