Skip to content
Snippets Groups Projects
Commit 3a1756bd authored by Petr Svenda's avatar Petr Svenda
Browse files

fix conditional update of broadcast time when no premix is supplied

parent f55c7c45
No related branches found
No related tags found
No related merge requests found
......@@ -474,7 +474,8 @@ def analyze_input_out_liquidity(coinjoins, postmix_spend, premix_spend, mix_prot
total_mix_staying = []
total_utxos = 0
broadcast_times = {cjtx: precomp_datetime.strptime(coinjoins[cjtx]['broadcast_time'], "%Y-%m-%d %H:%M:%S.%f") for cjtx in coinjoins.keys()}
broadcast_times.update({tx: precomp_datetime.strptime(postmix_spend[tx]['broadcast_time'], "%Y-%m-%d %H:%M:%S.%f") for tx in postmix_spend.keys()})
if postmix_spend:
broadcast_times.update({tx: precomp_datetime.strptime(postmix_spend[tx]['broadcast_time'], "%Y-%m-%d %H:%M:%S.%f") for tx in postmix_spend.keys()})
# Sort coinjoins based on mining time
cj_time = [{'txid': cjtxid, 'broadcast_time': precomp_datetime.strptime(coinjoins[cjtxid]['broadcast_time'], "%Y-%m-%d %H:%M:%S.%f")} for cjtxid in coinjoins.keys()]
sorted_cj_times = sorted(cj_time, key=lambda x: x['broadcast_time'])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment