@@ -1407,6 +1407,34 @@ def __repr__(self):
14071407 .format (self .nVersion , self .llmqType , self .quorumHash , self .quorumIndex , repr (self .signers ),
14081408 repr (self .validMembers ), self .quorumPublicKey .hex (), self .quorumVvecHash , self .quorumSig .hex (), self .membersSig .hex ())
14091409
1410+
1411+ class CFinalCommitmentPayload :
1412+ __slots__ = ("nVersion" , "nHeight" , "commitment" )
1413+
1414+ def __init__ (self ):
1415+ self .set_null ()
1416+
1417+ def set_null (self ):
1418+ self .nVersion = 0
1419+ self .nHeight = 0
1420+ self .commitment = CFinalCommitment ()
1421+
1422+ def deserialize (self , f ):
1423+ self .nVersion = struct .unpack ("<H" , f .read (2 ))[0 ]
1424+ self .nHeight = struct .unpack ("<I" , f .read (4 ))[0 ]
1425+ self .commitment = CFinalCommitment ()
1426+ self .commitment .deserialize (f )
1427+
1428+ def serialize (self ):
1429+ r = b""
1430+ r += struct .pack ("<H" , self .nVersion )
1431+ r += struct .pack ("<I" , self .nHeight )
1432+ r += self .commitment .serialize ()
1433+ return r
1434+
1435+ def __repr__ (self ):
1436+ return f"CFinalCommitmentPayload(nVersion={ self .nVersion } nHeight={ self .nHeight } commitment={ self .commitment } )"
1437+
14101438class CGovernanceObject :
14111439 __slots__ = ("nHashParent" , "nRevision" , "nTime" , "nCollateralHash" , "vchData" , "nObjectType" ,
14121440 "masternodeOutpoint" , "vchSig" )
0 commit comments