Browse Source

Merge #811: Bugfix: correct check of receiver inputs in BIP78

dc4a5b2 Bugfix: correct check of receiver inputs in BIP78 (Adam Gibson)
master
Adam Gibson 5 years ago
parent
commit
365ca38cc2
No known key found for this signature in database
GPG Key ID: 141001A1AF77F20B
  1. 6
      jmclient/jmclient/payjoin.py

6
jmclient/jmclient/payjoin.py

@ -295,8 +295,10 @@ class JMPayjoinManager(object):
for j, inp2 in enumerate(ourins):
if (inp.prevout.hash, inp.prevout.n) == inp2:
found[j] += 1
else:
receiver_input_indices.append(i)
break
else:
receiver_input_indices.append(i)
assert len(receiver_input_indices) + len(ourins) == len(in_psbt.unsigned_tx.vin)
if any([f != 1 for f in found]):
return (False, "Receiver proposed PSBT does not contain our inputs.")

Loading…
Cancel
Save