]> Git Repo - VerusCoin.git/commitdiff
Equals operators for copying
authormiketout <[email protected]>
Thu, 7 May 2020 05:11:10 +0000 (22:11 -0700)
committermiketout <[email protected]>
Thu, 7 May 2020 05:11:10 +0000 (22:11 -0700)
src/primitives/block.h
src/primitives/transaction.h

index 74a5a5b30880857ed4b93cf22fce291fab5788b2..349c30cacd6e9e73fb5ce81c47a35a91281e852d 100644 (file)
@@ -549,6 +549,14 @@ public:
     CBlockHeaderProof(const CMMRProof &powerNodeProof, const CBlockHeader &bh) : 
         headerProof(powerNodeProof), mmrBridge(bh.MMRProofBridge()), preHeader(bh) {}
 
+    const CBlockHeaderProof &operator=(const CBlockHeaderProof &operand)
+    {
+        CDataStream s(SER_NETWORK, PROTOCOL_VERSION);
+        s << operand;
+        s >> *this;
+        return *this;
+    }
+
     ADD_SERIALIZE_METHODS;
 
     template <typename Stream, typename Operation>
index 927800088294f434b474f6d74481fec5289c3ac3..e58c4af30d763f3fbc52f2b55dfaae3423959257 100644 (file)
@@ -1235,6 +1235,14 @@ public:
     CPartialTransactionProof(const CMMRProof &txRootProof, const CTransaction &tx) : 
         txProof(txRootProof), components({CTransactionComponentProof(tx, 0, CMMRProof())}) { }
 
+    const CPartialTransactionProof &operator=(const CPartialTransactionProof &operand)
+    {
+        CDataStream s(SER_NETWORK, PROTOCOL_VERSION);
+        s << operand;
+        s >> *this;
+        return *this;
+    }
+
     ADD_SERIALIZE_METHODS;
 
     template <typename Stream, typename Operation>
This page took 0.029757 seconds and 4 git commands to generate.