Browse Source

change min sigs to +1

pull/27/head
blackjok3r 6 years ago
parent
commit
0b6970c798
  1. 4
      src/komodo.h
  2. 2
      src/miner.cpp
  3. 6
      src/rpcmisc.cpp

4
src/komodo.h

@ -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);
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);
//if ( is_STAKED != 0 )
//{
// HERE we should add the notarisation to libscotts DB.
//}
if ( ASSETCHAINS_SYMBOL[0] == 0 )
{
if ( signedfp == 0 )

2
src/miner.cpp

@ -215,7 +215,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn,int32_t gpucount)
nTotalIn += nValueIn;
dPriority += (double)nValueIn * 1000; // flat multiplier
} 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;
if (ExtractDestination(tx.vout[0].scriptPubKey, ToAddress)) {
if ( strcmp(CRYPTO777_KMDADDR,CBitcoinAddress(ToAddress).ToString().c_str()) == 0 )

6
src/rpcmisc.cpp

@ -82,7 +82,7 @@ UniValue getiguanajson(const UniValue& params, bool fHelp)
UniValue seeds(UniValue::VARR);
UniValue notaries(UniValue::VARR);
// 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);
int32_t era = getera(now);
@ -98,10 +98,10 @@ UniValue getiguanajson(const UniValue& params, bool fHelp)
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;
if ( num_notaries_STAKED[era]/5 > overrideMinSigs )
minsigs = (num_notaries_STAKED[era] + 4) / 5;
minsigs = (num_notaries_STAKED[era] / 5) + 1;
else
minsigs = overrideMinSigs;

Loading…
Cancel
Save