change min sigs to +1
This commit is contained in:
@@ -708,6 +708,10 @@ int32_t komodo_voutupdate(int32_t *isratificationp,int32_t notaryid,uint8_t *scr
|
|||||||
komodo_stateupdate(height,0,0,0,zero,0,0,0,0,0,0,0,0,0,0,sp->MoM,sp->MoMdepth);
|
komodo_stateupdate(height,0,0,0,zero,0,0,0,0,0,0,0,0,0,0,sp->MoM,sp->MoMdepth);
|
||||||
if ( ASSETCHAINS_SYMBOL[0] != 0 )
|
if ( ASSETCHAINS_SYMBOL[0] != 0 )
|
||||||
printf("[%s] ht.%d NOTARIZED.%d %s.%s %sTXID.%s lens.(%d %d) MoM.%s %d\n",ASSETCHAINS_SYMBOL,height,*notarizedheightp,ASSETCHAINS_SYMBOL[0]==0?"KMD":ASSETCHAINS_SYMBOL,srchash.ToString().c_str(),ASSETCHAINS_SYMBOL[0]==0?"BTC":"KMD",desttxid.ToString().c_str(),opretlen,len,sp->MoM.ToString().c_str(),sp->MoMdepth);
|
printf("[%s] ht.%d NOTARIZED.%d %s.%s %sTXID.%s lens.(%d %d) MoM.%s %d\n",ASSETCHAINS_SYMBOL,height,*notarizedheightp,ASSETCHAINS_SYMBOL[0]==0?"KMD":ASSETCHAINS_SYMBOL,srchash.ToString().c_str(),ASSETCHAINS_SYMBOL[0]==0?"BTC":"KMD",desttxid.ToString().c_str(),opretlen,len,sp->MoM.ToString().c_str(),sp->MoMdepth);
|
||||||
|
//if ( is_STAKED != 0 )
|
||||||
|
//{
|
||||||
|
// HERE we should add the notarisation to libscotts DB.
|
||||||
|
//}
|
||||||
if ( ASSETCHAINS_SYMBOL[0] == 0 )
|
if ( ASSETCHAINS_SYMBOL[0] == 0 )
|
||||||
{
|
{
|
||||||
if ( signedfp == 0 )
|
if ( signedfp == 0 )
|
||||||
|
|||||||
@@ -215,7 +215,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn,int32_t gpucount)
|
|||||||
nTotalIn += nValueIn;
|
nTotalIn += nValueIn;
|
||||||
dPriority += (double)nValueIn * 1000; // flat multiplier
|
dPriority += (double)nValueIn * 1000; // flat multiplier
|
||||||
} else {
|
} else {
|
||||||
// TODO: It will be much faster here to just compare scriptpubkey!
|
// TODO: It will be much faster here to just compare scriptpubkey to the crypto pubkey!
|
||||||
CTxDestination ToAddress; int numNotaryVins = 0; bool fToCryptoAddress = false;
|
CTxDestination ToAddress; int numNotaryVins = 0; bool fToCryptoAddress = false;
|
||||||
if (ExtractDestination(tx.vout[0].scriptPubKey, ToAddress)) {
|
if (ExtractDestination(tx.vout[0].scriptPubKey, ToAddress)) {
|
||||||
if ( strcmp(CRYPTO777_KMDADDR,CBitcoinAddress(ToAddress).ToString().c_str()) == 0 )
|
if ( strcmp(CRYPTO777_KMDADDR,CBitcoinAddress(ToAddress).ToString().c_str()) == 0 )
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ UniValue getiguanajson(const UniValue& params, bool fHelp)
|
|||||||
UniValue seeds(UniValue::VARR);
|
UniValue seeds(UniValue::VARR);
|
||||||
UniValue notaries(UniValue::VARR);
|
UniValue notaries(UniValue::VARR);
|
||||||
// get the current era, use local time for now.
|
// get the current era, use local time for now.
|
||||||
// should ideally take blocktime of last known block.
|
// should ideally take blocktime of last known block?
|
||||||
int now = time(NULL);
|
int now = time(NULL);
|
||||||
int32_t era = getera(now);
|
int32_t era = getera(now);
|
||||||
|
|
||||||
@@ -98,10 +98,10 @@ UniValue getiguanajson(const UniValue& params, bool fHelp)
|
|||||||
notaries.push_back(notary);
|
notaries.push_back(notary);
|
||||||
}
|
}
|
||||||
|
|
||||||
// get the min sigs
|
// get the min sigs .. this always rounds UP so mine sigs in iguana is +1 min sigs in komodod, due to some rounding error.
|
||||||
int minsigs;
|
int minsigs;
|
||||||
if ( num_notaries_STAKED[era]/5 > overrideMinSigs )
|
if ( num_notaries_STAKED[era]/5 > overrideMinSigs )
|
||||||
minsigs = (num_notaries_STAKED[era] + 4) / 5;
|
minsigs = (num_notaries_STAKED[era] / 5) + 1;
|
||||||
else
|
else
|
||||||
minsigs = overrideMinSigs;
|
minsigs = overrideMinSigs;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user