-
Notifications
You must be signed in to change notification settings - Fork 285
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(core-transaction-pool): wallet-manager fallback to database wallet manager findByIndex() when no "local" match #3256
fix(core-transaction-pool): wallet-manager fallback to database wallet manager findByIndex() when no "local" match #3256
Conversation
try find index with db wallet manager if no match "locally"
Codecov Report
@@ Coverage Diff @@
## develop #3256 +/- ##
==========================================
+ Coverage 65.18% 65.2% +0.02%
==========================================
Files 431 431
Lines 12123 12132 +9
Branches 1631 1633 +2
==========================================
+ Hits 7902 7911 +9
Misses 4188 4188
Partials 33 33
Continue to review full report at Codecov.
|
With these changes the following lines become obsolete, is that right? core/packages/core-transactions/src/handlers/htlc-refund.ts Lines 53 to 56 in 8f028f8
Instead, we can call |
And another question for my personal understanding: should the Wallet Managers be allowed to be out of sync at all? |
@dated Initially the PoolWalletManager has no wallets and clones every database wallet that is missing. The reason why it is an issue for HTLC is because
Yes, these should be obsolete now. @air1one |
Understood! Thanks for the explanation! |
No I think it's better to keep it this way, we actually want to check just against the database wallets, with associated lock transaction forged. (we don't want to validate if the lock transaction is still in the pool and was applied just to tx pool wallet, even though in theory this shouldn't happen) |
…t manager findByIndex() when no "local" match (#3256)
Summary
Resolves #3242
Transaction pool wallet manager : try database wallet manager findByIndex() when local findByIndex() doesn't return a match.
We might not have all existing wallets indexes on transaction pool wallet manager : so in case we get no match we should try with database wallet manager.
Checklist