@@ -19,7 +19,7 @@ echo $pubkey
|
|||||||
./komodod -pubkey=$pubkey -ac_name=WLC -ac_supply=210000000 -addnode=148.251.190.89 $1 -gen &
|
./komodod -pubkey=$pubkey -ac_name=WLC -ac_supply=210000000 -addnode=148.251.190.89 $1 -gen &
|
||||||
./komodod -pubkey=$pubkey -ac_name=KV -ac_supply=1000000 -addnode=78.47.196.146 $1 -gen &
|
./komodod -pubkey=$pubkey -ac_name=KV -ac_supply=1000000 -addnode=78.47.196.146 $1 -gen &
|
||||||
./komodod -pubkey=$pubkey -ac_name=CEAL -ac_supply=366666666 -addnode=78.47.196.146 $1 -gen &
|
./komodod -pubkey=$pubkey -ac_name=CEAL -ac_supply=366666666 -addnode=78.47.196.146 $1 -gen &
|
||||||
./komodod -pubkey=$pubkey -ac_name=MESH -ac_supply=1000006 -addnode=78.47.196.146 $1 -gen &
|
./komodod -pubkey=$pubkey -ac_name=MESH -ac_supply=1000007 -addnode=78.47.196.146 $1 -gen &
|
||||||
sleep $delay
|
sleep $delay
|
||||||
|
|
||||||
./komodod -pubkey=$pubkey -ac_name=USD -addnode=78.47.196.146 $1 &
|
./komodod -pubkey=$pubkey -ac_name=USD -addnode=78.47.196.146 $1 &
|
||||||
|
|||||||
@@ -391,7 +391,8 @@ extern char ASSETCHAINS_SYMBOL[16];
|
|||||||
|
|
||||||
CAmount CCoinsViewCache::GetValueIn(int32_t nHeight,int64_t *interestp,const CTransaction& tx,uint32_t tiptime) const
|
CAmount CCoinsViewCache::GetValueIn(int32_t nHeight,int64_t *interestp,const CTransaction& tx,uint32_t tiptime) const
|
||||||
{
|
{
|
||||||
*interestp = 0;
|
if ( interestp != 0 )
|
||||||
|
*interestp = 0;
|
||||||
if ( tx.IsCoinBase() != 0 )
|
if ( tx.IsCoinBase() != 0 )
|
||||||
return 0;
|
return 0;
|
||||||
CAmount value,nResult = 0;
|
CAmount value,nResult = 0;
|
||||||
|
|||||||
@@ -856,7 +856,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
|
|||||||
// if using block pruning, then disable txindex
|
// if using block pruning, then disable txindex
|
||||||
// also disable the wallet (for now, until SPV support is implemented in wallet)
|
// also disable the wallet (for now, until SPV support is implemented in wallet)
|
||||||
if (GetArg("-prune", 0)) {
|
if (GetArg("-prune", 0)) {
|
||||||
if (GetBoolArg("-txindex", false))
|
if (GetBoolArg("-txindex", true))
|
||||||
return InitError(_("Prune mode is incompatible with -txindex."));
|
return InitError(_("Prune mode is incompatible with -txindex."));
|
||||||
#ifdef ENABLE_WALLET
|
#ifdef ENABLE_WALLET
|
||||||
if (!GetBoolArg("-disablewallet", false)) {
|
if (!GetBoolArg("-disablewallet", false)) {
|
||||||
@@ -1281,7 +1281,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
|
|||||||
nTotalCache = std::max(nTotalCache, nMinDbCache << 20); // total cache cannot be less than nMinDbCache
|
nTotalCache = std::max(nTotalCache, nMinDbCache << 20); // total cache cannot be less than nMinDbCache
|
||||||
nTotalCache = std::min(nTotalCache, nMaxDbCache << 20); // total cache cannot be greated than nMaxDbcache
|
nTotalCache = std::min(nTotalCache, nMaxDbCache << 20); // total cache cannot be greated than nMaxDbcache
|
||||||
int64_t nBlockTreeDBCache = nTotalCache / 8;
|
int64_t nBlockTreeDBCache = nTotalCache / 8;
|
||||||
if (nBlockTreeDBCache > (1 << 21) && !GetBoolArg("-txindex", false))
|
if (nBlockTreeDBCache > (1 << 21) && !GetBoolArg("-txindex", true))
|
||||||
nBlockTreeDBCache = (1 << 21); // block tree db cache shouldn't be larger than 2 MiB
|
nBlockTreeDBCache = (1 << 21); // block tree db cache shouldn't be larger than 2 MiB
|
||||||
nTotalCache -= nBlockTreeDBCache;
|
nTotalCache -= nBlockTreeDBCache;
|
||||||
int64_t nCoinDBCache = std::min(nTotalCache / 2, (nTotalCache / 4) + (1 << 23)); // use 25%-50% of the remainder for disk cache
|
int64_t nCoinDBCache = std::min(nTotalCache / 2, (nTotalCache / 4) + (1 << 23)); // use 25%-50% of the remainder for disk cache
|
||||||
@@ -1337,7 +1337,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check for changed -txindex state
|
// Check for changed -txindex state
|
||||||
if (fTxIndex != GetBoolArg("-txindex", false)) {
|
if (fTxIndex != GetBoolArg("-txindex", true)) {
|
||||||
strLoadError = _("You need to rebuild the database using -reindex to change -txindex");
|
strLoadError = _("You need to rebuild the database using -reindex to change -txindex");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -964,9 +964,12 @@ int32_t komodo_check_deposit(int32_t height,const CBlock& block) // verify above
|
|||||||
else //if ( kmdheights[i-1] > 0 && otherheights[i-1] > 0 )
|
else //if ( kmdheights[i-1] > 0 && otherheights[i-1] > 0 )
|
||||||
{
|
{
|
||||||
hash = block.GetHash();
|
hash = block.GetHash();
|
||||||
|
for (j=0; j<n; j++)
|
||||||
|
printf("%.8f ",dstr(block.vtx[0].vout[j].nValue));
|
||||||
|
printf("vout values\n");
|
||||||
for (j=0; j<32; j++)
|
for (j=0; j<32; j++)
|
||||||
printf("%02x",((uint8_t *)&hash)[j]);
|
printf("%02x",((uint8_t *)&hash)[j]);
|
||||||
printf(" kht.%d ht.%d %.8f %.8f blockhash couldnt find vout.[%d] ht.%d %s for [%s]\n",kmdheights[i-1],otherheights[i-1],dstr(values[i-1]),dstr(srcvalues[i]),i,height,ASSETCHAINS_SYMBOL,CURRENCIES[baseids[i-1]]);
|
printf(" kht.%d ht.%d %.8f %.8f blockhash couldnt find vout.[%d of %d] ht.%d %s for [%s]\n",kmdheights[i-1],otherheights[i-1],dstr(values[i-1]),dstr(srcvalues[i]),i,n,height,ASSETCHAINS_SYMBOL,CURRENCIES[baseids[i-1]]);
|
||||||
if ( ASSETCHAINS_SYMBOL[0] != 0 || height >= activation )
|
if ( ASSETCHAINS_SYMBOL[0] != 0 || height >= activation )
|
||||||
return(-1);
|
return(-1);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ void komodo_kvupdate(uint8_t *opretbuf,int32_t opretlen,uint64_t value)
|
|||||||
{
|
{
|
||||||
if ( komodo_kvsigverify(keyvalue,keylen+refvaluesize,refpubkey,sig) < 0 )
|
if ( komodo_kvsigverify(keyvalue,keylen+refvaluesize,refpubkey,sig) < 0 )
|
||||||
{
|
{
|
||||||
//printf("komodo_kvsigverify error [%d]\n",coresize-13);
|
printf("komodo_kvsigverify error [%d]\n",coresize-13);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -165,6 +165,7 @@ void komodo_kvupdate(uint8_t *opretbuf,int32_t opretlen,uint64_t value)
|
|||||||
memcpy(ptr->key,key,keylen);
|
memcpy(ptr->key,key,keylen);
|
||||||
newflag = 1;
|
newflag = 1;
|
||||||
HASH_ADD_KEYPTR(hh,KOMODO_KV,ptr->key,ptr->keylen,ptr);
|
HASH_ADD_KEYPTR(hh,KOMODO_KV,ptr->key,ptr->keylen,ptr);
|
||||||
|
//printf("KV add.(%s) (%s)\n",ptr->key,valueptr);
|
||||||
}
|
}
|
||||||
if ( newflag != 0 || (ptr->flags & KOMODO_KVPROTECTED) == 0 )
|
if ( newflag != 0 || (ptr->flags & KOMODO_KVPROTECTED) == 0 )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1810,7 +1810,6 @@ bool CheckTxInputs(const CTransaction& tx, CValidationState& state, const CCoins
|
|||||||
int64_t interest; int32_t txheight; uint32_t locktime;
|
int64_t interest; int32_t txheight; uint32_t locktime;
|
||||||
if ( (interest= komodo_accrued_interest(&txheight,&locktime,prevout.hash,prevout.n,0,coins->vout[prevout.n].nValue)) != 0 )
|
if ( (interest= komodo_accrued_interest(&txheight,&locktime,prevout.hash,prevout.n,0,coins->vout[prevout.n].nValue)) != 0 )
|
||||||
{
|
{
|
||||||
//printf("checkResult %.8f += val %.8f interest %.8f ht.%d lock.%u tip.%u\n",(double)nValueIn/COIN,(double)coins->vout[prevout.n].nValue/COIN,(double)interest/COIN,txheight,locktime,chainActive.Tip()->nTime);
|
|
||||||
//fprintf(stderr,"checkResult %.8f += val %.8f interest %.8f ht.%d lock.%u tip.%u\n",(double)nValueIn/COIN,(double)coins->vout[prevout.n].nValue/COIN,(double)interest/COIN,txheight,locktime,chainActive.Tip()->nTime);
|
//fprintf(stderr,"checkResult %.8f += val %.8f interest %.8f ht.%d lock.%u tip.%u\n",(double)nValueIn/COIN,(double)coins->vout[prevout.n].nValue/COIN,(double)interest/COIN,txheight,locktime,chainActive.Tip()->nTime);
|
||||||
nValueIn += interest;
|
nValueIn += interest;
|
||||||
}
|
}
|
||||||
@@ -3329,7 +3328,7 @@ bool ContextualCheckBlockHeader(const CBlockHeader& block, CValidationState& sta
|
|||||||
// Don't accept any forks from the main chain prior to last checkpoint
|
// Don't accept any forks from the main chain prior to last checkpoint
|
||||||
CBlockIndex* pcheckpoint = Checkpoints::GetLastCheckpoint(chainParams.Checkpoints());
|
CBlockIndex* pcheckpoint = Checkpoints::GetLastCheckpoint(chainParams.Checkpoints());
|
||||||
int32_t notarized_height;
|
int32_t notarized_height;
|
||||||
if (pcheckpoint && nHeight < pcheckpoint->nHeight)
|
if (pcheckpoint && (nHeight < pcheckpoint->nHeight || nHeight == 1 && chainActive.Tip() != 0 && chainActive.Tip()->nHeight > 1) )
|
||||||
return state.DoS(100, error("%s: forked chain older than last checkpoint (height %d) vs %d", __func__, nHeight,pcheckpoint->nHeight));
|
return state.DoS(100, error("%s: forked chain older than last checkpoint (height %d) vs %d", __func__, nHeight,pcheckpoint->nHeight));
|
||||||
else if ( komodo_checkpoint(¬arized_height,nHeight,hash) < 0 )
|
else if ( komodo_checkpoint(¬arized_height,nHeight,hash) < 0 )
|
||||||
return state.DoS(100, error("%s: forked chain %d older than last notarized (height %d) vs %d", __func__,nHeight, notarized_height));
|
return state.DoS(100, error("%s: forked chain %d older than last notarized (height %d) vs %d", __func__,nHeight, notarized_height));
|
||||||
@@ -4020,7 +4019,7 @@ bool InitBlockIndex() {
|
|||||||
return true;
|
return true;
|
||||||
|
|
||||||
// Use the provided setting for -txindex in the new database
|
// Use the provided setting for -txindex in the new database
|
||||||
fTxIndex = GetBoolArg("-txindex", false);
|
fTxIndex = GetBoolArg("-txindex", true);
|
||||||
pblocktree->WriteFlag("txindex", fTxIndex);
|
pblocktree->WriteFlag("txindex", fTxIndex);
|
||||||
LogPrintf("Initializing databases...\n");
|
LogPrintf("Initializing databases...\n");
|
||||||
|
|
||||||
|
|||||||
@@ -56,7 +56,11 @@ void TxConfirmStats::ClearCurrent(unsigned int nBlockHeight)
|
|||||||
unsigned int TxConfirmStats::FindBucketIndex(double val)
|
unsigned int TxConfirmStats::FindBucketIndex(double val)
|
||||||
{
|
{
|
||||||
auto it = bucketMap.lower_bound(val);
|
auto it = bucketMap.lower_bound(val);
|
||||||
assert(it != bucketMap.end());
|
//assert(it != bucketMap.end());
|
||||||
|
if ( it != bucketMap.end() )
|
||||||
|
{
|
||||||
|
fprintf(stderr,"FindBucketIndex violation: from val %f\n",val);
|
||||||
|
}
|
||||||
return it->second;
|
return it->second;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user