Browse Source
transaction: follow-up prev
makes more sense to special-case deserialize()
and not invoke the extra logic then
hard-fail-on-bad-server-string
SomberNight
5 years ago
No known key found for this signature in database
GPG Key ID: B33B5F232C6271E9
1 changed files with
2 additions and
2 deletions
-
electrum/transaction.py
|
@ -577,7 +577,7 @@ class Transaction: |
|
|
raw_bytes = bfh(self._cached_network_ser) |
|
|
raw_bytes = bfh(self._cached_network_ser) |
|
|
vds = BCDataStream() |
|
|
vds = BCDataStream() |
|
|
vds.write(raw_bytes) |
|
|
vds.write(raw_bytes) |
|
|
self.version = vds.read_int32() |
|
|
self._version = vds.read_int32() |
|
|
n_vin = vds.read_compact_size() |
|
|
n_vin = vds.read_compact_size() |
|
|
is_segwit = (n_vin == 0) |
|
|
is_segwit = (n_vin == 0) |
|
|
if is_segwit: |
|
|
if is_segwit: |
|
@ -595,7 +595,7 @@ class Transaction: |
|
|
if is_segwit: |
|
|
if is_segwit: |
|
|
for txin in self._inputs: |
|
|
for txin in self._inputs: |
|
|
parse_witness(vds, txin) |
|
|
parse_witness(vds, txin) |
|
|
self.locktime = vds.read_uint32() |
|
|
self._locktime = vds.read_uint32() |
|
|
if vds.can_read_more(): |
|
|
if vds.can_read_more(): |
|
|
raise SerializationError('extra junk at the end') |
|
|
raise SerializationError('extra junk at the end') |
|
|
|
|
|
|
|
|