void ErrorAndBP(std::string msg)
{
printf("%s\n", msg.c_str());
+ LogPrintf("%s\n", msg.c_str());
}
}
default:
{
- ErrorAndBP("ERROR: unrecognized object in proof sequence");
- delete pProof;
+ ErrorAndBP("ERROR: likely double-free or memory corruption, unrecognized object in proof sequence");
+ // this is likely a memory error
+ // delete pProof;
}
}
proofSequence.pop_back();
s << oldProof;
s >> *this;
}
+ const CMMRProof &operator=(const CMMRProof &operand)
+ {
+ CDataStream s(SER_NETWORK, PROTOCOL_VERSION);
+ s << operand;
+ DeleteProofSequence();
+ s >> *this;
+ return *this;
+ }
~CMMRProof()
{
version = VERSION_INVALID;
}
+ const CCrossChainProof &operator=(const CCrossChainProof &operand)
+ {
+ CDataStream s(SER_NETWORK, PROTOCOL_VERSION);
+ s << operand;
+ DeleteOpRetObjects(chainObjects);
+ s >> *this;
+ return *this;
+ }
+
ADD_SERIALIZE_METHODS;
template <typename Stream, typename Operation>
CTransaction chainDefTx;
uint160 thisChainID = ConnectedChains.ThisChain().GetID();
- LOCK(cs_main);
+ LOCK2(cs_main, mempool.cs);
if (!GetCurrencyDefinition(currencyID, chainDef, &defHeight) || currencyID == thisChainID)
{
if (!found)
{
LogPrintf("%s: No export thread found\n", __func__);
- printf("%s: No export thread found\n", __func__);
+ //printf("%s: No export thread found\n", __func__);
return false;
}
if (aixIt->second.second.vout[i].scriptPubKey.IsPayToCryptoCondition(p) && p.IsValid() && p.evalCode == EVAL_RESERVE_DEPOSIT)
{
newImportTx.vin.push_back(CTxIn(depositTxId, i, CScript()));
- for (auto &oneCur : aixIt->second.second.vout[i].ReserveOutValue().valueMap)
- {
- rtxd.AddReserveInput(oneCur.first, oneCur.second);
- }
}
}