wallet: modernize architecture with interfaces, syncer, SQL store, and integration tests#1181
wallet: modernize architecture with interfaces, syncer, SQL store, and integration tests#1181yyforyongyu wants to merge 1 commit intosql-walletfrom
Conversation
The test's stop() method asserted that the queriedPeer channel was empty after shutdown. However, the neutrino work manager can non-deterministically dispatch the same query to multiple peers via retries or worker redistribution, producing extra OnGetData callbacks. This caused sporadic "did not consume all queriedPeer signals" failures. Replace the strict empty-check with a drain loop. Tests that need to verify specific query counts already do so explicitly via assertPeerQueried.
|
@claude review this |
|
Claude finished @Roasbeef's task in 1m 23s —— View job Review of PR #1181
Change SummaryThis PR contains a single commit ( Before: The select {
case <-h.queriedPeer:
h.t.Fatal("did not consume all queriedPeer signals")
default:
}After: It drains any remaining signals without failing: for len(h.queriedPeer) > 0 {
<-h.queriedPeer
}ReviewThe fix is correct and well-reasoned. Here's why:
One minor note: The Verdict: LGTM — this is a clean, minimal fix for a legitimate flaky test. The comment explaining the rationale is helpful. |
Summary
Controller,Signer,AddressManager,AccountManager,UtxoManager,TxCreator,TxPublisher,TxReader,TxWriter,PsbtManager) with comprehensive implementations and testssyncerwith CFilter-based scanning, reorg handling, and targeted rescan supportwallet/internal/db) with PostgreSQL and SQLite backends, migrations, and integration testsbwtestintegration test harness with bitcoind/neutrino backends anditesttest casesbtcunitpackage for type-safe fee rate and transaction size calculationschain.Interfacewith batch RPCs (GetBlockHashes,GetCFilter) across btcd, bitcoind, and neutrino backendsTest plan
make unitmake itestmake lint🤖 Generated with Claude Code