Browse Source

Debug output and comments

pull/455/head
miketout 2 years ago
parent
commit
c232806d77
  1. 4
      src/miner.cpp
  2. 6
      src/pbaas/notarization.cpp
  3. 2
      src/pbaas/reserves.h

4
src/miner.cpp

@ -1977,11 +1977,11 @@ CBlockTemplate* CreateNewBlock(const CChainParams& chainparams, const std::vecto
mempool.removeConflicts(notarizationTx, removedTxVec);
CValidationState mempoolState;
relayTx = myAddtomempool(notarizationTx, &state);
if (LogAcceptCategory("notarizationverbose") || LogAcceptCategory("notarization"))
if (LogAcceptCategory("notarization"))
{
for (auto oneTx : removedTxVec)
{
if (LogAcceptCategory("notarizationverbose"))
if (LogAcceptCategory("verbose"))
{
UniValue jsonNTx(UniValue::VOBJ);
TxToUniv(oneTx, uint256(), jsonNTx);

6
src/pbaas/notarization.cpp

@ -5332,6 +5332,12 @@ bool ValidateFinalizeNotarization(struct CCcontract_info *cp, Eval* eval, const
return true;
}
}
if (LogAcceptCategory("notarization") && LogAcceptCategory("verbose"))
{
UniValue jsonNTx(UniValue::VOBJ);
TxToUniv(tx, uint256(), jsonNTx);
LogPrintf("%s: transaction removed from mempool due to conflicts:\n%s\n", __func__, jsonNTx.write(1,2).c_str());
}
return eval->Error("Invalid spend of confirmed finalization to transaction with no confirmed output");
}

2
src/pbaas/reserves.h

@ -947,6 +947,8 @@ public:
CCurrencyValueMap totalAmounts; // total amount exported of each currency, including fees
CCurrencyValueMap totalFees; // total fees in all currencies to split between this export and import
CCurrencyValueMap totalBurned; // if this is a cross chain export, some currencies will be burned, the rest held in deposits
// TODO: HARDENING - on next testnet reset, move this variable to before the CCurrencyValueMaps for easier parsing in the contracts
CTransferDestination exporter; // typically the exporting miner or staker's address, to accept deferred payment for the export
int32_t firstInput; // if export is from inputs, on chain of reserveTransfers, this is first input, -1 for cross-chain

Loading…
Cancel
Save