gui: cpfp: calc parent fee for cpfp using wallet.get_tx_info
I am only making this change as it makes it simpler to do manual testing of CPFP-ing *local* txs. That is, by changing a few easy-to-find lines of code, I can make the GUI allow CPFP-ing a local tx, but without this change it errors out with "unknown fee for parent transaction". If one has an incoming local tx saved in the wallet, adb.get_tx_fee(txid) returns None (if the tx gets into the mempool, it will use the server-reported value instead). In contrast, wallet.get_tx_info(tx).fee calls both wallet.get_wallet_delta(tx) and adb.get_tx_fee(txid), making it more expensive but more complete.
This commit is contained in:
@@ -757,6 +757,7 @@ class AddressSynchronizer(Logger, EventListener):
|
||||
incorrectly early-exit and return None, e.g. for not-all-ismine-input txs,
|
||||
where we could calculate the fee if we deserialized (but to see if we have all
|
||||
the parent txs available, we would have to deserialize first).
|
||||
More expensive but more complete alternative: wallet.get_tx_info(tx).fee
|
||||
"""
|
||||
# check if stored fee is available
|
||||
fee = self.db.get_tx_fee(txid, trust_server=False)
|
||||
|
||||
Reference in New Issue
Block a user