parent
4a7ce238fd
commit
e12af33626
@ -717,11 +717,14 @@ class AddressSynchronizer(PrintError):
|
|||||||
return None
|
return None
|
||||||
if hasattr(tx, '_cached_fee'):
|
if hasattr(tx, '_cached_fee'):
|
||||||
return tx._cached_fee
|
return tx._cached_fee
|
||||||
|
with self.lock, self.transaction_lock:
|
||||||
is_relevant, is_mine, v, fee = self.get_wallet_delta(tx)
|
is_relevant, is_mine, v, fee = self.get_wallet_delta(tx)
|
||||||
if fee is None:
|
if fee is None:
|
||||||
txid = tx.txid()
|
txid = tx.txid()
|
||||||
fee = self.tx_fees.get(txid)
|
fee = self.tx_fees.get(txid)
|
||||||
if fee is not None:
|
# cache fees. if wallet is synced, cache all;
|
||||||
|
# otherwise only cache non-None, as None can still change while syncing
|
||||||
|
if self.up_to_date or fee is not None:
|
||||||
tx._cached_fee = fee
|
tx._cached_fee = fee
|
||||||
return fee
|
return fee
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user