Skip to content

Commit

Permalink
Namecoin: Fill in scriptpubkey in get_wallet_name_count
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyRand committed Feb 17, 2020
1 parent 2612c6b commit 8c7967c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions electrum_nmc/electrum/names.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,14 @@ def get_wallet_name_count(wallet, network):

utxos = wallet.get_utxos()
for _, x in enumerate(utxos):
# TODO: Namecoin: Upstream Electrum only returns inputs with the
# "trusted address" field set, not the scriptpubkey set. This prevents
# us from seeing the name prefix. For now we manually fill in the
# scriptpubkey via add_input_info, but we should submit a PR to
# upstream Electrum that replaces "trusted addresses" with "trusted
# scriptpubkeys".
wallet.add_input_info(x)

txid = x.prevout.txid
vout = x.prevout.out_idx
name_op = x.name_op
Expand Down

0 comments on commit 8c7967c

Please sign in to comment.