Skip to content

fix(wallet): publish events for affected inputs#1435

Merged
glevco merged 1 commit intomasterfrom
experimental/fix-wallet-events
Oct 1, 2025
Merged

fix(wallet): publish events for affected inputs#1435
glevco merged 1 commit intomasterfrom
experimental/fix-wallet-events

Conversation

@glevco
Copy link
Contributor

@glevco glevco commented Oct 1, 2025

Motivation

There's a bug in the handling of wallet events for the address history websocket. Currently, we subscribe to CONSENSUS_TX_UPDATE events and publish respective WALLET_ADDRESS_HISTORY for 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_by may 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

  • Add wallet event handling for affected tx inputs.

Checklist

  • If you are requesting a merge into master, confirm this code is production-ready and can be included in future releases as soon as it gets merged

@glevco glevco self-assigned this Oct 1, 2025
@glevco glevco added the bug Something isn't working label Oct 1, 2025
@glevco glevco moved this from Todo to In Progress (WIP) in Hathor Network Oct 1, 2025
@glevco glevco force-pushed the experimental/fix-wallet-events branch from dcf3f5f to 8d574c4 Compare October 1, 2025 16:42
@glevco glevco changed the title fix wallet events fix(wallet): publish events for affected inputs Oct 1, 2025
@glevco glevco force-pushed the experimental/fix-wallet-events branch from 8d574c4 to e4471a0 Compare October 1, 2025 16:50
@glevco glevco force-pushed the experimental/fix-wallet-events branch from e4471a0 to e8d2917 Compare October 1, 2025 16:50
@glevco glevco moved this from In Progress (WIP) to In Progress (Done) in Hathor Network Oct 1, 2025
@github-actions
Copy link

github-actions bot commented Oct 1, 2025

🐰 Bencher Report

Branchexperimental/fix-wallet-events
Testbedubuntu-22.04
Click to view all benchmark results
BenchmarkLatencyBenchmark 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%)
🐰 View full continuous benchmarking report in Bencher

@glevco glevco moved this from In Progress (Done) to In Review (WIP) in Hathor Network Oct 1, 2025
@codecov
Copy link

codecov bot commented Oct 1, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.80%. Comparing base (584c0c3) to head (e8d2917).
⚠️ Report is 1 commits behind head on master.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@glevco glevco merged commit 4d5742a into master Oct 1, 2025
10 checks passed
@glevco glevco deleted the experimental/fix-wallet-events branch October 1, 2025 18:56
@github-project-automation github-project-automation bot moved this from In Review (WIP) to Waiting to be deployed in Hathor Network Oct 1, 2025
@jansegre jansegre mentioned this pull request Oct 7, 2025
2 tasks
@jansegre jansegre moved this from Waiting to be deployed to Done in Hathor Network Oct 15, 2025
@jansegre jansegre mentioned this pull request Oct 16, 2025
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants