mirror of
https://github.com/dashpay/dash.git
synced 2024-12-24 11:32:46 +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:
|
||||
__slots__ = ("header", "txn")
|
||||
|
||||
def __init__(self, header=CBlockHeader(), txn=CPartialMerkleTree()):
|
||||
self.header = header
|
||||
self.txn = txn
|
||||
def __init__(self, header=None, txn=None):
|
||||
if header is None:
|
||||
self.header = CBlockHeader()
|
||||
else:
|
||||
self.header = header
|
||||
if txn is None:
|
||||
self.txn = CPartialMerkleTree()
|
||||
else:
|
||||
self.txn = txn
|
||||
|
||||
def deserialize(self, f):
|
||||
self.header.deserialize(f)
|
||||
|
Loading…
Reference in New Issue
Block a user