fix prints and revert mempool error.

This commit is contained in:
blackjok3r
2018-12-17 16:24:29 +08:00
parent ce7aed05cd
commit cacd2c7c02
3 changed files with 1 additions and 7 deletions

View File

@@ -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);

View File

@@ -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

View File

@@ -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());