1
0
This commit is contained in:
SomberNight
2018-01-10 18:39:25 +01:00
parent 65eae139af
commit d8a9c9720a
3 changed files with 17 additions and 8 deletions

View File

@@ -682,8 +682,12 @@ class Transaction:
return value_field + witness
@classmethod
def is_segwit_input(self, txin):
return txin['type'] in ['p2wpkh', 'p2wpkh-p2sh', 'p2wsh', 'p2wsh-p2sh']
def is_segwit_input(cls, txin):
return cls.is_segwit_inputtype(txin['type'])
@classmethod
def is_segwit_inputtype(cls, txin_type):
return txin_type in ('p2wpkh', 'p2wpkh-p2sh', 'p2wsh', 'p2wsh-p2sh')
@classmethod
def input_script(self, txin, estimate_size=False):