-
Notifications
You must be signed in to change notification settings - Fork 232
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
Add AcceptedTransactionIDs to ChainChanged notification and VirtualSelectedParentChain RPC #2036
Conversation
…esponseMessage and VirtualSelectedParentChainChangedNotificationMessage
app/rpc/manager.go
Outdated
@@ -196,7 +196,7 @@ func (m *Manager) notifyVirtualSelectedParentChainChanged(virtualChangeSet *exte | |||
defer onEnd() | |||
|
|||
notification, err := m.context.ConvertVirtualSelectedParentChainChangesToChainChangedNotificationMessage( | |||
virtualChangeSet.VirtualSelectedParentChainChanges) | |||
virtualChangeSet.VirtualSelectedParentChainChanges, true) |
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.
You're populating the notification with tx data even if the user didn't subscribe to RPC notifications. I guess it could be a heavy operation.
Codecov Report
@@ Coverage Diff @@
## dev #2036 +/- ##
==========================================
+ Coverage 59.38% 59.49% +0.11%
==========================================
Files 675 675
Lines 32211 32296 +85
==========================================
+ Hits 19127 19213 +86
+ Misses 10333 10324 -9
- Partials 2751 2759 +8
Continue to review full report at Codecov.
|
65a2841
to
696e651
Compare
app/rpc/manager.go
Outdated
virtualChangeSet.VirtualSelectedParentChainChanges, true) | ||
if err != nil { | ||
return err | ||
if m.context.NotificationManager.DoesAnyListenerPropagateVirtualSelectedParentChainChanged() { |
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.
Can you also check if one of the listeners asked for transactions?
bdcb91e
to
5119172
Compare
This PR was requested by TxBit, since it's complicated for them to follow balances tracking UTXO changes.
And example usage can be seen at: https://github.com/svarogg/kaspadotnet/blob/main/Kaspadotnet.Examples/FollowTransactions.cs