1
0

conflicting transactions

This commit is contained in:
SomberNight
2018-02-06 05:39:26 +01:00
parent 245cd24f34
commit ca19a36478
4 changed files with 115 additions and 30 deletions

View File

@@ -797,6 +797,14 @@ class Transaction:
def serialize_outpoint(self, txin):
return bh2u(bfh(txin['prevout_hash'])[::-1]) + int_to_hex(txin['prevout_n'], 4)
@classmethod
def get_outpoint_from_txin(cls, txin):
if txin['type'] == 'coinbase':
return None
prevout_hash = txin['prevout_hash']
prevout_n = txin['prevout_n']
return prevout_hash + ':%d' % prevout_n
@classmethod
def serialize_input(self, txin, script):
# Prev hash and index