Browse Source

addr_sync: (trivial) don't use private utxo._is_coinbase_output

master
SomberNight 3 years ago
parent
commit
90f1279d9a
No known key found for this signature in database
GPG Key ID: B33B5F232C6271E9
  1. 4
      electrum/address_synchronizer.py

4
electrum/address_synchronizer.py

@ -845,14 +845,14 @@ class AddressSynchronizer(Logger, EventListener):
c = u = x = 0 c = u = x = 0
mempool_height = self.get_local_height() + 1 # height of next block mempool_height = self.get_local_height() + 1 # height of next block
for utxo in coins.values(): for utxo in coins.values(): # type: PartialTxInput
if utxo.spent_height is not None: if utxo.spent_height is not None:
continue continue
if utxo.prevout.to_str() in excluded_coins: if utxo.prevout.to_str() in excluded_coins:
continue continue
v = utxo.value_sats() v = utxo.value_sats()
tx_height = utxo.block_height tx_height = utxo.block_height
is_cb = utxo._is_coinbase_output is_cb = utxo.is_coinbase_output()
if is_cb and tx_height + COINBASE_MATURITY > mempool_height: if is_cb and tx_height + COINBASE_MATURITY > mempool_height:
x += v x += v
elif tx_height > 0: elif tx_height > 0:

Loading…
Cancel
Save