src/apps/wallet: small docu fix in Bip143 class

pull/25/head
Pavol Rusnak 6 years ago
parent db763bf05d
commit da4bea34a0
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

@ -46,23 +46,22 @@ class Bip143:
assert not tx.overwintered assert not tx.overwintered
write_uint32(h_preimage, tx.version) # nVersion write_uint32(h_preimage, tx.version) # nVersion
write_bytes(h_preimage, bytearray(self.get_prevouts_hash())) # hashPrevouts write_bytes(h_preimage, bytearray(self.get_prevouts_hash())) # hashPrevouts
write_bytes(h_preimage, bytearray(self.get_sequence_hash())) # hashSequence write_bytes(h_preimage, bytearray(self.get_sequence_hash())) # hashSequence
write_bytes_rev(h_preimage, txi.prev_hash) # outpoint
write_uint32(h_preimage, txi.prev_index) # outpoint
script_code = self.derive_script_code(txi, pubkeyhash) write_bytes_rev(h_preimage, txi.prev_hash) # outpoint
write_varint(h_preimage, len(script_code)) # scriptCode length write_uint32(h_preimage, txi.prev_index) # outpoint
write_bytes(h_preimage, script_code) # scriptCode
write_uint64(h_preimage, txi.amount) # amount script_code = self.derive_script_code(txi, pubkeyhash) # scriptCode
write_uint32(h_preimage, txi.sequence) # nSequence write_varint(h_preimage, len(script_code))
write_bytes(h_preimage, script_code)
write_bytes(h_preimage, bytearray(self.get_outputs_hash())) # hashOutputs write_uint64(h_preimage, txi.amount) # amount
write_uint32(h_preimage, tx.lock_time) # nLockTime write_uint32(h_preimage, txi.sequence) # nSequence
write_uint32(h_preimage, sighash) # nHashType write_bytes(h_preimage, bytearray(self.get_outputs_hash())) # hashOutputs
write_uint32(h_preimage, tx.lock_time) # nLockTime
write_uint32(h_preimage, sighash) # nHashType
return get_tx_hash(h_preimage, True) return get_tx_hash(h_preimage, True)

Loading…
Cancel
Save