Major rebase and fix staking.

This commit is contained in:
blackjok3r
2018-12-16 23:04:45 +08:00
parent 5c4fe22eb4
commit 3028d884e5
6 changed files with 63 additions and 97 deletions

View File

@@ -5317,7 +5317,7 @@ int32_t komodo_staked(CMutableTransaction &txNew,uint32_t nBits,uint32_t *blockt
counter++;
if ( out.nDepth < nMinDepth || out.nDepth > nMaxDepth )
{
//fprintf(stderr,"komodo_staked invalid depth %d\n",(int32_t)out.nDepth);
fprintf(stderr,"komodo_staked invalid depth %d\n",(int32_t)out.nDepth);
continue;
}
CAmount nValue = out.tx->vout[out.i].nValue;
@@ -5388,7 +5388,7 @@ int32_t komodo_staked(CMutableTransaction &txNew,uint32_t nBits,uint32_t *blockt
}
} //else fprintf(stderr,"utxo not eligible\n");
}
if ( numkp < 10000 && array != 0 )
if ( numkp < 1000 && array != 0 )
{
free(array);
array = 0;

View File

@@ -867,8 +867,6 @@ static bool IsKeyType(string strType)
strType == "mkey" || strType == "ckey");
}
extern uint64_t ASSETCHAINS_STAKED;
DBErrors CWalletDB::LoadWallet(CWallet* pwallet)
{
pwallet->vchDefaultKey = CPubKey();
@@ -920,9 +918,8 @@ DBErrors CWalletDB::LoadWallet(CWallet* pwallet)
{
// Leave other errors alone, if we try to fix them we might make things worse.
fNoncriticalErrors = true; // ... but do warn the user there is something wrong.
if (strType == "tx" && ASSETCHAINS_STAKED == 0 )
if (strType == "tx" )
// Rescan if there is a bad transaction record..
// But dont on staked chains!
SoftSetBoolArg("-rescan", true);
}
}