Commit 7c6ed7b
committed
btc: pull peer mempool on connect (BIP 35) so embedded TemplateBuilder produces POPULATED blocks
The new_tx -> mempool.add_tx subscription in main_btc only sees txs
announced via inv AFTER connect. Txs already resident in the bitcoind
mempool at connect time (e.g. a seeded regtest mempool) were never
requested, so won blocks were coinbase-only (nTx=1) — the G3b POPULATED
residual.
Expose Node::enable_mempool_request() (forwards to NodeP2P, applied at
start_p2p time and to any later reconnect) and call it from main_btc
after start_p2p. Mirrors the established main_dgb pattern. Peer must
advertise NODE_BLOOM (regtest: -peerbloomfilters=1) or NodeP2P skips the
request (logged) to avoid a disconnect; normal inv relay is unchanged.
BTC-fenced; no cross-coin contract change.1 parent 7f02492 commit 7c6ed7b
2 files changed
Lines changed: 26 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
533 | 533 | | |
534 | 534 | | |
535 | 535 | | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
536 | 545 | | |
537 | 546 | | |
538 | 547 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
79 | 80 | | |
80 | 81 | | |
81 | 82 | | |
| 83 | + | |
| 84 | + | |
82 | 85 | | |
83 | 86 | | |
84 | 87 | | |
85 | 88 | | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
86 | 103 | | |
87 | 104 | | |
88 | 105 | | |
| |||
0 commit comments