Skip to content

Commit

Permalink
Namecoin: Remove redundant name_op plumbing in wallet
Browse files Browse the repository at this point in the history
PartialTxInput has a scriptpubkey property for this now.
  • Loading branch information
JeremyRand committed Feb 6, 2020
1 parent ebeac68 commit 68316ab
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions electrum_nmc/electrum/wallet.py
Original file line number Diff line number Diff line change
Expand Up @@ -1321,12 +1321,6 @@ def _add_input_utxo_info(self, txin: PartialTxInput, address: str) -> None:
if txin.utxo is None:
# note: for hw wallets, for legacy inputs, ignore_network_issues used to be False
txin.utxo = self.get_input_tx(txin.prevout.txid.hex(), ignore_network_issues=True)
if 'name_op' not in txin:
if txin['prevout_hash'] in self.db.transactions:
prevouts = self.db.transactions[txin['prevout_hash']].outputs()
if txin['prevout_n'] < len(prevouts):
prevout = prevouts[txin['prevout_n']]
txin['name_op'] = prevout.name_op
# If there is a NON-WITNESS UTXO, but we know input is segwit, add a WITNESS UTXO, based on it.
# This could have happened if previously another wallet had put a NON-WITNESS UTXO for txin,
# as they did not know if it was segwit. This switch is needed to interop with bitcoin core.
Expand Down

0 comments on commit 68316ab

Please sign in to comment.