-
Notifications
You must be signed in to change notification settings - Fork 440
Wallet::insert_tx should not have position input #1446
Description
Describe the problem
The Wallet::insert_tx method allows us to add a transaction and instantly confirm it by anchoring the transaction to the wallet tip. This is dangerous as the user is not aware of how it works internally, and may anchor the transaction to the wrong tip (which will result in nonsensical history later on).
The correct way to insert confirmed or in-mempool transactions is via a chain-source which creates a wallet::Update.
I propose changing this method to only insert transactions without anchors or last seen. Therefore, I think this will be tackled in #1416 (assuming that #1416 is a good idea). In other words, this method will just insert transactions that have not left "application memory", or unbroadcasted transactions.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status