-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Musig2RoundFinalizeError caused by concurrency problem #493
base: develop
Are you sure you want to change the base?
Fix Musig2RoundFinalizeError caused by concurrency problem #493
Conversation
49fd486
to
8fcd2f0
Compare
8fcd2f0
to
e21cfda
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #493 +/- ##
===========================================
+ Coverage 50.53% 50.60% +0.06%
===========================================
Files 49 49
Lines 31878 31978 +100
===========================================
+ Hits 16110 16182 +72
- Misses 15768 15796 +28
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
unexpected_events.insert(event.to_string()); | ||
} | ||
|
||
let unexpected_events = Arc::new(TokioRwLock::new(unexpected_events)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think using OutputPort in ractor::port::output - Rust and OutputPortSubscriber in ractor::port::output - Rust for current event_receiver/event_sender
would be better, because OutputPort
/OutputPortSubscriber
natively supports broadcasting (send events to multiple subscribers) and filtering out uninterested events (creating a subscriber to subscribe only unexpected events is easy). Of course, using OutputPort
/OutputPortSubscriber
instead of mpsc::Sender<NetworkServiceEvent>/mpsc::Receiver<NetworkServiceEvent>
requires much more work.
2405eb8
to
6f436fb
Compare
bd6bd8b
to
53a264e
Compare
c5c77b0
to
dd5c346
Compare
dd5c346
to
07d054d
Compare
433a54a
to
89fb81c
Compare
bb4c1bb
to
77555e5
Compare
77555e5
to
d665a40
Compare
2804cc0
to
77577ab
Compare
89c1af4
to
8390836
Compare
LGTM |
Fixes #480
Fixes #475
When there are multiple
RemoveTlcFail
happened at the same time, nodeA
's TLC withRemoveTlcFail
may in RemoveWaitAck, nodeB
's corresponding TLC may already be removed from memory, so Musig2RoundFinalizeError will be triggered.In this PR, we keep
RemoveTlcFail
in TLC list and will remove it when the number exceeds 2 in any direction of the channel.