fix miner better

This commit is contained in:
blackjok3r
2019-02-14 21:59:05 +08:00
parent 695eb871bb
commit 52450bf202
2 changed files with 42 additions and 47 deletions

View File

@@ -709,6 +709,10 @@ int32_t komodo_voutupdate(bool fJustCheck,int32_t *isratificationp,int32_t notar
{ {
if ( fJustCheck ) if ( fJustCheck )
return(-2); return(-2);
// On the first notarization initilise previous previous to 0.
if ( sp->NUM_NPOINTS == 1 )
sp->PPNOTARIZED_HEIGHT = 0;
sp->PPNOTARIZED_HEIGHT = sp->PNOTARIZED_HEIGHT; sp->PPNOTARIZED_HEIGHT = sp->PNOTARIZED_HEIGHT;
sp->PNOTARIZED_HEIGHT = sp->NOTARIZED_HEIGHT; sp->PNOTARIZED_HEIGHT = sp->NOTARIZED_HEIGHT;
sp->NOTARIZED_HEIGHT = *notarizedheightp; sp->NOTARIZED_HEIGHT = *notarizedheightp;

View File

@@ -392,15 +392,7 @@ CBlockTemplate* CreateNewBlock(CPubKey _pk,const CScript& _scriptPubKeyIn, int32
CFeeRate feeRate(nTotalIn-tx.GetValueOut(), nTxSize); CFeeRate feeRate(nTotalIn-tx.GetValueOut(), nTxSize);
if (fNotarisation) if ( fNotarisation && check_pprevnotarizedht() )
{
// Can't make payment until 3 notarizations have happened.
if ( !check_pprevnotarizedht() )
{
fNotarisation = false;
fNotarisationBlock = false;
}
else
{ {
// check if the notarization found is actually valid. // check if the notarization found is actually valid.
if ( tx.vout.size() == 2 && tx.vout[1].nValue == 0 ) if ( tx.vout.size() == 2 && tx.vout[1].nValue == 0 )
@@ -450,7 +442,6 @@ CBlockTemplate* CreateNewBlock(CPubKey _pk,const CScript& _scriptPubKeyIn, int32
} }
} }
} }
}
else if ( dPriority == 1e16 ) else if ( dPriority == 1e16 )
{ {
dPriority -= 10; dPriority -= 10;