-
Notifications
You must be signed in to change notification settings - Fork 123
staticaddr: neutrino fixes #967
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
Conversation
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.
Thanks for the improvement. Only see one issue, otherwise looks good to go.
I pushed another commit |
@@ -227,15 +227,18 @@ func (m *Manager) recoverWithdrawals(ctx context.Context) error { | |||
} | |||
|
|||
// Group the deposits by their finalized withdrawal transaction. | |||
depositsByWithdrawalTx := make(map[*wire.MsgTx][]*deposit.Deposit) | |||
depositsByWithdrawalTx := make(map[chainhash.Hash][]*deposit.Deposit) |
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.
thanks for the fix!
This is needed for neutrino.
Use errgroup to publish each transaction in a separate goroutine. Publishing a transaction can take a while in neutrino mode.
Do not rely on GetActiveDepositsInState reusing the same *wire.MsgTx pointer for a unique transaction.
Rebased and pushed another commit with logging fix "staticaddr: fix error formatting in the log". |
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.
LGTM ⚡
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.
LGTM!
Recovered withdrawal transactions are now published in parallel to speed-up starting Loop.
Also increased the timeout given for this startup (including the withdrawals' recovery) from 10s to 1m.
Also added logging and removed an unused method in an interface.
Pull Request Checklist
release_notes.md
if your PR contains major features, breaking changes or bugfixes