Commit 0eca6f6
authored
dgb: stand up embedded coin-daemon ingest surface in run-loop (#250)
Construct dgb::interfaces::Node (coin/node_interface.hpp) in run_node and
subscribe BOTH the HeaderChain and the Mempool to its new_headers / new_tx
feeds via the wire_header_ingest + wire_mempool_ingest SSOT connectors.
This is the CONSUMER seam the embedded coin-daemon P2P node (coin/p2p_node.hpp
NodeP2P) binds against: NodeP2P fires new_headers on each received headers
batch and new_tx on each relayed tx; routing both through the wire_*_ingest
connectors makes a live feed flow into HeaderChain::validate_and_append and
Mempool::add_tx the moment the NodeP2P producer is connected (its construct +
connect is the next slice). header+mempool ingest wired together.
coin_iface is declared AFTER header_chain + mempool so it (and its event
subscriptions, whose handlers capture chain/pool by reference) destructs first.
No behavior change this slice: with no NodeP2P producer constructed yet the
feeds never fire, so chain + mempool stay byte-identical to before. main_dgb.cpp
links the full dgb codec, so the mempool_ingest.hpp #143 SCC note is satisfied.
Single-file (src/c2pool/main_dgb.cpp). Build EXIT=0, --selftest OK.
Co-authored-by: frstrtr <frstrtr@users.noreply.github.com>1 parent 552399e commit 0eca6f6
1 file changed
Lines changed: 30 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
35 | 38 | | |
36 | 39 | | |
37 | 40 | | |
| |||
267 | 270 | | |
268 | 271 | | |
269 | 272 | | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
270 | 300 | | |
271 | 301 | | |
272 | 302 | | |
| |||
0 commit comments