Browse Source

try fix

pull/27/head
blackjok3r 5 years ago
parent
commit
e2e7614dff
  1. 17
      src/miner.cpp

17
src/miner.cpp

@ -371,21 +371,22 @@ CBlockTemplate* CreateNewBlock(CPubKey _pk,const CScript& _scriptPubKeyIn, int32
{
// check a notary didnt sign twice (this would be an invalid notarisation later on and cause problems)
std::set<int> checkdupes( NotarisationNotaries.begin(), NotarisationNotaries.end() );
if ( tx.GetHash().ToString() == invalidnotarisation )
if ( checkdupes.size() != NotarisationNotaries.size() )
{
NotarisationNotaries.clear();
fprintf(stderr, "notarisation %s is invalid leave it as a normal tx.\n", invalidnotarisation.c_str());
fprintf(stderr, "possible notarisation is signed multiple times by same notary, passed as normal transaction.\n");
}
else if ( checkdupes.size() != NotarisationNotaries.size() )
else if ( tx.GetHash().ToString() == invalidnotarisation )
{
// check if the last notarisation we tried was flagged as invalid.
// then clear it, in case next time it is seen as valid.
NotarisationNotaries.clear();
fprintf(stderr, "possible notarisation is signed multiple times by same notary, passed as normal transaction.\n");
}
invalidnotarisation = "";
fprintf(stderr, "notarisation %s is invalid leave it as a normal tx.\n", invalidnotarisation.c_str());
}
else
fNotarisation = true;
}
else
NotarisationNotaries.clear();
} else NotarisationNotaries.clear();
nTotalIn += tx.GetShieldedValueIn();
}

Loading…
Cancel
Save