fix(wallet): publish events for affected inputs#1435
Merged
Conversation
dcf3f5f to
8d574c4
Compare
8d574c4 to
e4471a0
Compare
e4471a0 to
e8d2917
Compare
|
| Branch | experimental/fix-wallet-events |
| Testbed | ubuntu-22.04 |
Click to view all benchmark results
| Benchmark | Latency | Benchmark Result minutes (m) (Result Δ%) | Lower Boundary minutes (m) (Limit %) | Upper Boundary minutes (m) (Limit %) |
|---|---|---|---|---|
| sync-v2 (up to 20000 blocks) | 📈 view plot 🚷 view threshold | 1.97 m(+14.99%)Baseline: 1.71 m | 1.54 m (78.26%) | 2.06 m (95.83%) |
jansegre
approved these changes
Oct 1, 2025
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1435 +/- ##
==========================================
+ Coverage 85.76% 85.80% +0.04%
==========================================
Files 431 431
Lines 33264 33274 +10
Branches 5213 5215 +2
==========================================
+ Hits 28530 28552 +22
+ Misses 3687 3677 -10
+ Partials 1047 1045 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
msbrogli
approved these changes
Oct 1, 2025
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
There's a bug in the handling of wallet events for the address history websocket. Currently, we subscribe to
CONSENSUS_TX_UPDATEevents and publish respectiveWALLET_ADDRESS_HISTORYfor them. This means we publish wallet events for each tx that was touched by the consensus.When a txA that spends a txB is (un)voided, the txB's
spent_bymay change and it should generate a wallet event. However, it's possible that txB is not touched by the consensus, therefore its event wouldn't be generated. This PR fixes this by adding a check and generating events for txA's inputs, too.Acceptance Criteria
Checklist
master, confirm this code is production-ready and can be included in future releases as soon as it gets merged