Commit a3f6814
fix(spv): reset filter_committed_height on Clear SPV Data
At rust-dashcore 309fac8, WalletManager gained an independent
filter_committed_height field. FiltersManager::new() reads
filter_committed_height() for its "already synced" guard; the field is
no longer derived from synced_height.
Previously clear_data_dir called update_synced_height(0), which
pre-bump effectively reset both fields via the trait's default impl.
Post-bump it only resets synced_height, leaving filter_committed_height
at its stale previous value. FiltersManager then logs "Filters already
synced to N" and skips the rescan, producing zero balance after a
Clear SPV Data.
Switch clear_data_dir to update_filter_committed_height(0), which
unconditionally sets the field and only bumps synced_height upward if
the incoming height is larger — exactly the semantics we need for a
rescan-floor reset.
Adds a regression test asserting filter_committed_height is lowered to 0
after clear_data_dir().
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent c370779 commit a3f6814
2 files changed
Lines changed: 56 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
813 | 813 | | |
814 | 814 | | |
815 | 815 | | |
816 | | - | |
817 | | - | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
818 | 821 | | |
819 | 822 | | |
820 | | - | |
| 823 | + | |
821 | 824 | | |
822 | 825 | | |
823 | | - | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
824 | 829 | | |
825 | 830 | | |
826 | 831 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
637 | 638 | | |
638 | 639 | | |
639 | 640 | | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
0 commit comments