From cacd2c7c02ca85bfaf5daa6d05f2181953d52bb1 Mon Sep 17 00:00:00 2001 From: blackjok3r Date: Mon, 17 Dec 2018 16:24:29 +0800 Subject: [PATCH] fix prints and revert mempool error. --- src/crosschain_authority.cpp | 1 - src/main.cpp | 2 +- src/notarisationdb.cpp | 5 ----- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/crosschain_authority.cpp b/src/crosschain_authority.cpp index b4379c010..7487e4879 100644 --- a/src/crosschain_authority.cpp +++ b/src/crosschain_authority.cpp @@ -42,7 +42,6 @@ bool CheckTxAuthority(const CTransaction &tx, CrosschainAuthority auth) if (!seen[i]) { if (memcmp(pk, auth.notaries[i], 33) == 0) { seen[i] = 1; - printf("seennotary.%i\n",i); goto found; } else { //printf("notary.%i is not valid!\n",i); diff --git a/src/main.cpp b/src/main.cpp index c11e58818..cc97b366f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -4748,7 +4748,7 @@ bool CheckBlock(int32_t *futureblockp,int32_t height,CBlockIndex *pindex,const C CValidationState state; CTransaction Tx; const CTransaction &tx = (CTransaction)block.vtx[i]; - if (tx.IsCoinBase() || (!tx.vjoinsplit.empty() && !tx.vShieldedSpend.empty()) || ((i == (block.vtx.size() - 1)) && (ASSETCHAINS_STAKED && komodo_isPoS((CBlock *)&block) != 0))) + if (tx.IsCoinBase() || !tx.vjoinsplit.empty() || !tx.vShieldedSpend.empty() || ((i == (block.vtx.size() - 1)) && (ASSETCHAINS_STAKED && komodo_isPoS((CBlock *)&block) != 0))) continue; Tx = tx; if ( myAddtomempool(Tx, &state, true) == false ) // happens with out of order tx in block on resync diff --git a/src/notarisationdb.cpp b/src/notarisationdb.cpp index c1cee2877..3b0746d80 100644 --- a/src/notarisationdb.cpp +++ b/src/notarisationdb.cpp @@ -41,24 +41,19 @@ NotarisationsInBlock ScanBlockNotarisations(const CBlock &block, int nHeight) } else if (authority == CROSSCHAIN_STAKED) { // We need to create auth_STAKED dynamically here based on timestamp int32_t staked_era = STAKED_era(timestamp); - printf("ERA.(%d) \n",staked_era); if (staked_era == 0) { // this is an ERA GAP, so we will ignore this notarization - printf("Notarization for %s occured inside an ERA GAP, we will ignore it! \n",data.symbol); continue; } else { // pass era slection off to notaries_staked.cpp file auth_STAKED = Choose_auth_STAKED(staked_era); } - printf("minsigs.%i era.%i authsize.%i\n",auth_STAKED.requiredSigs,staked_era,auth_STAKED.size); if (!CheckTxAuthority(tx, auth_STAKED)) continue; - printf("Authorised notarisation data for %s \n",data.symbol); } if (parsed) { vNotarisations.push_back(std::make_pair(tx.GetHash(), data)); - printf("Added notarisation data for %s \n",data.symbol); //printf("Parsed a notarisation for: %s, txid:%s, ccid:%i, momdepth:%i\n", // data.symbol, tx.GetHash().GetHex().data(), data.ccId, data.MoMDepth); //if (!data.MoMoM.IsNull()) printf("MoMoM:%s\n", data.MoMoM.GetHex().data());