mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-10 08:38:28 +00:00
fix: [expand btc adress] filter empty addr fields
This commit is contained in:
parent
165119883a
commit
f139e9564e
1 changed files with 6 additions and 4 deletions
|
@ -34,11 +34,13 @@ def get_bitcoin_info(bitcoin_address, nb_transaction=50):
|
||||||
|
|
||||||
for transaction in jreq['txs']:
|
for transaction in jreq['txs']:
|
||||||
for input in transaction['inputs']:
|
for input in transaction['inputs']:
|
||||||
if input['prev_out']['addr'] != bitcoin_address:
|
if 'addr' in input['prev_out']:
|
||||||
set_btc_in.add(input['prev_out']['addr'])
|
if input['prev_out']['addr'] != bitcoin_address:
|
||||||
|
set_btc_in.add(input['prev_out']['addr'])
|
||||||
for output in transaction['out']:
|
for output in transaction['out']:
|
||||||
if output['addr'] != bitcoin_address:
|
if 'addr' in output:
|
||||||
set_btc_out.add(output['addr'])
|
if output['addr'] != bitcoin_address:
|
||||||
|
set_btc_out.add(output['addr'])
|
||||||
|
|
||||||
dict_btc['btc_in'] = filter_btc_seen(set_btc_in)
|
dict_btc['btc_in'] = filter_btc_seen(set_btc_in)
|
||||||
dict_btc['btc_out'] = filter_btc_seen(set_btc_out)
|
dict_btc['btc_out'] = filter_btc_seen(set_btc_out)
|
||||||
|
|
Loading…
Reference in a new issue