Commit f6bc91d
committed
Implement block acceptance verification system
Parent blocks are now verified after submission via async checks at
+10s, +30s, and +120s. The verification callback checks if the block
hash appears in the header chain (embedded mode) or queries the daemon
via RPC.
Status tracking:
- FoundBlock now has status (pending/confirmed/orphaned/stale) and
check_count fields
- /recent_blocks REST endpoint includes "status" and "checks" fields
- Verification results are logged: "Block CONFIRMED" or "Block ORPHANED"
Architecture:
- set_block_verify_fn() accepts a callback: returns >0=confirmed,
<0=orphaned, 0=pending
- schedule_block_verification() fires timers at +10s, +30s, +120s
- Works with both embedded (header chain lookup) and RPC (getblock)
backends — ready for future DOGE embedded P2P node
For merged blocks: submitauxblock RPC already returns success/failure.
Full async verification (delayed getblock) will be added when the
embedded DOGE P2P node is implemented.1 parent 7f70bd3 commit f6bc91d
3 files changed
Lines changed: 117 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1099 | 1099 | | |
1100 | 1100 | | |
1101 | 1101 | | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
1102 | 1115 | | |
1103 | 1116 | | |
1104 | 1117 | | |
| |||
1338 | 1351 | | |
1339 | 1352 | | |
1340 | 1353 | | |
| 1354 | + | |
| 1355 | + | |
| 1356 | + | |
1341 | 1357 | | |
1342 | 1358 | | |
1343 | 1359 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2093 | 2093 | | |
2094 | 2094 | | |
2095 | 2095 | | |
| 2096 | + | |
2096 | 2097 | | |
2097 | 2098 | | |
2098 | | - | |
2099 | | - | |
| 2099 | + | |
| 2100 | + | |
| 2101 | + | |
| 2102 | + | |
| 2103 | + | |
| 2104 | + | |
| 2105 | + | |
| 2106 | + | |
| 2107 | + | |
2100 | 2108 | | |
2101 | 2109 | | |
2102 | 2110 | | |
| |||
2362 | 2370 | | |
2363 | 2371 | | |
2364 | 2372 | | |
2365 | | - | |
| 2373 | + | |
| 2374 | + | |
2366 | 2375 | | |
2367 | 2376 | | |
2368 | 2377 | | |
2369 | 2378 | | |
| 2379 | + | |
| 2380 | + | |
| 2381 | + | |
| 2382 | + | |
| 2383 | + | |
| 2384 | + | |
| 2385 | + | |
| 2386 | + | |
| 2387 | + | |
| 2388 | + | |
| 2389 | + | |
| 2390 | + | |
| 2391 | + | |
| 2392 | + | |
| 2393 | + | |
| 2394 | + | |
| 2395 | + | |
| 2396 | + | |
| 2397 | + | |
| 2398 | + | |
| 2399 | + | |
| 2400 | + | |
| 2401 | + | |
| 2402 | + | |
| 2403 | + | |
| 2404 | + | |
| 2405 | + | |
| 2406 | + | |
| 2407 | + | |
| 2408 | + | |
| 2409 | + | |
| 2410 | + | |
| 2411 | + | |
| 2412 | + | |
| 2413 | + | |
| 2414 | + | |
| 2415 | + | |
| 2416 | + | |
| 2417 | + | |
| 2418 | + | |
| 2419 | + | |
| 2420 | + | |
| 2421 | + | |
| 2422 | + | |
| 2423 | + | |
| 2424 | + | |
| 2425 | + | |
| 2426 | + | |
| 2427 | + | |
| 2428 | + | |
| 2429 | + | |
| 2430 | + | |
| 2431 | + | |
| 2432 | + | |
| 2433 | + | |
| 2434 | + | |
| 2435 | + | |
| 2436 | + | |
| 2437 | + | |
| 2438 | + | |
| 2439 | + | |
| 2440 | + | |
| 2441 | + | |
| 2442 | + | |
2370 | 2443 | | |
2371 | 2444 | | |
2372 | 2445 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
428 | 428 | | |
429 | 429 | | |
430 | 430 | | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
431 | 438 | | |
432 | 439 | | |
433 | 440 | | |
| |||
499 | 506 | | |
500 | 507 | | |
501 | 508 | | |
| 509 | + | |
| 510 | + | |
502 | 511 | | |
503 | 512 | | |
504 | 513 | | |
| |||
567 | 576 | | |
568 | 577 | | |
569 | 578 | | |
570 | | - | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
571 | 592 | | |
572 | 593 | | |
573 | 594 | | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
574 | 598 | | |
575 | 599 | | |
576 | 600 | | |
| |||
0 commit comments