feat(wallet): WalletTx now supports non-canonical txs#480
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #480 +/- ##
==========================================
- Coverage 80.30% 80.29% -0.02%
==========================================
Files 24 24
Lines 5417 5566 +149
Branches 245 246 +1
==========================================
+ Hits 4350 4469 +119
- Misses 989 1020 +31
+ Partials 78 77 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
bc1de69 to
2bf915d
Compare
|
Concept ACK |
2bf915d to
5968606
Compare
|
After some ideas by ValuedMammal I simplified the model a bit:
PR description updated accordingly. |
|
|
cd09dc5 to
fe447ad
Compare
|
Yep I agree. I added |
Description
WalletTxwas an alias forCanonicalTx, sowallet.transactions()andwallet.get_tx(txid)only returned canonical wallet-relevant txs. Evicted/replaced txs disappeared tho still wallet relevant.This PR changes
WalletTxtoTransactionInfoand makes it a struct that represents any wallet-relevant tx:Canonical status lives in
details.canonicality.Fixes #295
Supported use cases
Surface now including non-canonical txs
TransactionInfo,TxCanonicality,TxDetails,transactions(),get_tx()Notes to the reviewers
transactions()takes a small hit. Worth confirming whether it's an issue in practice.Changelog notice
WalletTx→TransactionInfostruct withdetails,tx_node,last_evicted,conflicts;WalletTxStatus→TxCanonicality.transactions()/get_tx()also return non-canonical wallet-relevant txs.TxDetails::chain_position→canonicality.Wallet::tx_details(txid), usewallet.get_tx(txid).details.Checklists
All Submissions:
just pbefore pushingNew Features: