Commit cab3fb8
committed
fix(cbf): stamp sync timestamps even when no scripts are registered
Both sync_onchain_wallet and sync_lightning_wallet returned Ok(())
early when there were no registered scripts, *before* reaching the
update_node_metrics_timestamp call. As a result, on-chain-only nodes
(no Lightning channels) never advanced latest_lightning_wallet_sync_
timestamp, and any caller treating that timestamp as a "sync ran"
signal would observe a permanent stall.
This is the root cause behind the wait_for_cbf_sync helper timing out
in CI for every test that doesn't open a Lightning channel
(fee_rate_estimation_after_manual_sync_cbf, onchain_send_receive_cbf,
onchain_wallet_recovery_cbf, repeated_manual_sync_cbf,
start_stop_reinit_cbf). The helper requires both onchain and lightning
timestamps to advance, and the lightning side could never advance for
those nodes.
Other chain sources (electrum, bitcoind) already stamp the lightning
sync timestamp unconditionally on success, so this brings CBF in line
with them: an empty-scripts call is treated as a successful no-op
sync, the actual filter scan is still correctly skipped, and the
requester() precondition check remains in place to ensure we never
mark a sync as successful while the chain source isn't running.
Reviewed by Codex (gpt-5.4).
AI-assisted with Claude Code.1 parent ead0e2a commit cab3fb8
1 file changed
Lines changed: 63 additions & 65 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
586 | 586 | | |
587 | 587 | | |
588 | 588 | | |
589 | | - | |
590 | 589 | | |
591 | 590 | | |
592 | 591 | | |
593 | 592 | | |
594 | | - | |
595 | | - | |
596 | | - | |
597 | | - | |
598 | | - | |
599 | | - | |
600 | | - | |
601 | | - | |
602 | | - | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
603 | 601 | | |
604 | | - | |
605 | | - | |
606 | | - | |
607 | | - | |
608 | | - | |
609 | | - | |
610 | | - | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
611 | 609 | | |
612 | | - | |
613 | | - | |
614 | | - | |
615 | | - | |
616 | | - | |
617 | | - | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
618 | 622 | | |
619 | | - | |
620 | | - | |
621 | | - | |
622 | | - | |
623 | | - | |
624 | | - | |
625 | 623 | | |
626 | | - | |
627 | | - | |
| 624 | + | |
| 625 | + | |
628 | 626 | | |
629 | | - | |
| 627 | + | |
630 | 628 | | |
631 | | - | |
632 | | - | |
633 | | - | |
634 | | - | |
635 | | - | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
636 | 635 | | |
637 | 636 | | |
638 | 637 | | |
| |||
733 | 732 | | |
734 | 733 | | |
735 | 734 | | |
736 | | - | |
737 | 735 | | |
738 | 736 | | |
739 | 737 | | |
740 | 738 | | |
741 | | - | |
742 | | - | |
743 | | - | |
744 | | - | |
745 | | - | |
746 | | - | |
747 | | - | |
748 | | - | |
749 | | - | |
750 | | - | |
751 | | - | |
752 | | - | |
753 | | - | |
754 | | - | |
755 | | - | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
756 | 753 | | |
757 | | - | |
758 | | - | |
759 | | - | |
760 | | - | |
761 | | - | |
762 | | - | |
763 | | - | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
764 | 761 | | |
765 | | - | |
766 | | - | |
767 | | - | |
768 | | - | |
769 | | - | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
770 | 768 | | |
771 | 769 | | |
772 | 770 | | |
| |||
0 commit comments