Updated hash type for replay protection

This commit is contained in:
Chris Sulmone 2018-02-25 11:42:12 -06:00
parent 40233396c5
commit b4b05d2560
1 changed files with 3 additions and 1 deletions

View File

@ -763,7 +763,9 @@ class Transaction:
def serialize_preimage(self, i):
nVersion = int_to_hex(self.version, 4)
nHashType = int_to_hex(1, 4)
nHashType = 1 | 0x40
nHashType = nHashType | (42 << 8)
nHashType = int_to_hex(nHashType, 4)
nLocktime = int_to_hex(self.locktime, 4)
inputs = self.inputs()
outputs = self.outputs()