mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 03:52:49 +01:00
fix: initialization of CMerkleBlock() due to misusage of default argument to follow-up bitcoin#30552
This commit is contained in:
parent
79ced62d6f
commit
237460c533
@ -1069,9 +1069,15 @@ class CPartialMerkleTree:
|
|||||||
class CMerkleBlock:
|
class CMerkleBlock:
|
||||||
__slots__ = ("header", "txn")
|
__slots__ = ("header", "txn")
|
||||||
|
|
||||||
def __init__(self, header=CBlockHeader(), txn=CPartialMerkleTree()):
|
def __init__(self, header=None, txn=None):
|
||||||
self.header = header
|
if header is None:
|
||||||
self.txn = txn
|
self.header = CBlockHeader()
|
||||||
|
else:
|
||||||
|
self.header = header
|
||||||
|
if txn is None:
|
||||||
|
self.txn = CPartialMerkleTree()
|
||||||
|
else:
|
||||||
|
self.txn = txn
|
||||||
|
|
||||||
def deserialize(self, f):
|
def deserialize(self, f):
|
||||||
self.header.deserialize(f)
|
self.header.deserialize(f)
|
||||||
|
Loading…
Reference in New Issue
Block a user