From 7020df9139d60dac63172ca885b34c14a890d5c8 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 17 Apr 2017 10:18:22 +0300 Subject: [PATCH 01/36] New mesh --- src/assetchains | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/assetchains b/src/assetchains index 8905a9eb7..453cab621 100755 --- a/src/assetchains +++ b/src/assetchains @@ -16,11 +16,10 @@ echo $pubkey ./komodod -pubkey=$pubkey -ac_name=BOTS -ac_supply=999999 -addnode=78.47.196.146 $1 -gen & ./komodod -pubkey=$pubkey -ac_name=MGW -ac_supply=999999 -addnode=78.47.196.146 $1 -gen & ./komodod -pubkey=$pubkey -ac_name=MVP -ac_supply=1000000 -addnode=78.47.196.146 $1 -gen & -#./komodod -pubkey=$pubkey -ac_name=WIRELESS -ac_supply=21000000 -addnode=78.47.196.146 $1 & ./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=CEAL -ac_supply=366666666 -addnode=78.47.196.146 $1 -gen & -./komodod -pubkey=$pubkey -ac_name=MESH -ac_supply=1000001 -addnode=78.47.196.146 $1 -gen & +./komodod -pubkey=$pubkey -ac_name=MESH -ac_supply=999999 -addnode=78.47.196.146 $1 -gen & sleep $delay ./komodod -pubkey=$pubkey -ac_name=USD -addnode=78.47.196.146 $1 & From bfb634f2238c01c7fa782b6c5b79f5e6f207ded3 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 17 Apr 2017 17:24:00 +0300 Subject: [PATCH 02/36] Increment number of note witness cache --- src/wallet/wallet.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index ccba41065..d52f547d0 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -59,7 +59,7 @@ static const unsigned int MAX_FREE_TRANSACTION_CREATE_SIZE = 1000; // Should be large enough that we can expect not to reorg beyond our cache // unless there is some exceptional network disruption. #define _COINBASE_MATURITY 100 -static const unsigned int WITNESS_CACHE_SIZE = _COINBASE_MATURITY+1; +static const unsigned int WITNESS_CACHE_SIZE = _COINBASE_MATURITY+2; class CAccountingEntry; class CBlockIndex; From e9e7e410efcaf7f864b6a3d3f2343ed3fbb44bca Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 17 Apr 2017 17:33:52 +0300 Subject: [PATCH 03/36] Test --- src/wallet/wallet.cpp | 3 +++ src/wallet/wallet.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 5f78be478..fc8160bb4 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -635,6 +635,7 @@ void CWallet::ClearNoteWitnessCache() } } nWitnessCacheSize = 0; + fprintf(stderr,"Clear witness cache\n"); } void CWallet::IncrementNoteWitnesses(const CBlockIndex* pindex, @@ -669,6 +670,7 @@ void CWallet::IncrementNoteWitnesses(const CBlockIndex* pindex, } } if (nWitnessCacheSize < WITNESS_CACHE_SIZE) { + fprintf(stderr,"increment nWitnesscache -> %d\n",(int32_t)nWitnessCacheSize); nWitnessCacheSize += 1; } @@ -782,6 +784,7 @@ void CWallet::DecrementNoteWitnesses(const CBlockIndex* pindex) } } } + fprintf(stderr,"decrement witness cache -> %d\n",(int32_t)nWitnessCacheSize); nWitnessCacheSize -= 1; for (std::pair& wtxItem : mapWallet) { for (mapNoteData_t::value_type& item : wtxItem.second.mapNoteData) { diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index d52f547d0..ed7edbbc1 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -59,7 +59,7 @@ static const unsigned int MAX_FREE_TRANSACTION_CREATE_SIZE = 1000; // Should be large enough that we can expect not to reorg beyond our cache // unless there is some exceptional network disruption. #define _COINBASE_MATURITY 100 -static const unsigned int WITNESS_CACHE_SIZE = _COINBASE_MATURITY+2; +static const unsigned int WITNESS_CACHE_SIZE = _COINBASE_MATURITY+10; class CAccountingEntry; class CBlockIndex; From 0fff4d5e3fdda0f133c01fd3a85d83eeb3c67d5d Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 18 Apr 2017 08:58:41 +0300 Subject: [PATCH 04/36] Newer mesh --- src/assetchains | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/assetchains b/src/assetchains index 453cab621..a85cdbe38 100755 --- a/src/assetchains +++ b/src/assetchains @@ -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=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=MESH -ac_supply=999999 -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 ./komodod -pubkey=$pubkey -ac_name=USD -addnode=78.47.196.146 $1 & From a7f86bc7abea98dd46eb09b54ff5c5b93ffe54a2 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 18 Apr 2017 09:01:01 +0300 Subject: [PATCH 05/36] Remove print --- src/wallet/wallet.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index fc8160bb4..b1f543d5d 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -635,7 +635,7 @@ void CWallet::ClearNoteWitnessCache() } } nWitnessCacheSize = 0; - fprintf(stderr,"Clear witness cache\n"); + //fprintf(stderr,"Clear witness cache\n"); } void CWallet::IncrementNoteWitnesses(const CBlockIndex* pindex, @@ -670,7 +670,7 @@ void CWallet::IncrementNoteWitnesses(const CBlockIndex* pindex, } } if (nWitnessCacheSize < WITNESS_CACHE_SIZE) { - fprintf(stderr,"increment nWitnesscache -> %d\n",(int32_t)nWitnessCacheSize); + //fprintf(stderr,"increment nWitnesscache -> %d\n",(int32_t)nWitnessCacheSize); nWitnessCacheSize += 1; } @@ -784,7 +784,7 @@ void CWallet::DecrementNoteWitnesses(const CBlockIndex* pindex) } } } - fprintf(stderr,"decrement witness cache -> %d\n",(int32_t)nWitnessCacheSize); + //fprintf(stderr,"decrement witness cache -> %d\n",(int32_t)nWitnessCacheSize); nWitnessCacheSize -= 1; for (std::pair& wtxItem : mapWallet) { for (mapNoteData_t::value_type& item : wtxItem.second.mapNoteData) { From 8a382987c499ed53d638626f177fcdee4831294f Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 18 Apr 2017 15:55:45 +0300 Subject: [PATCH 06/36] Test --- src/komodo_kv.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/komodo_kv.h b/src/komodo_kv.h index 1ed6e1347..4d2163941 100644 --- a/src/komodo_kv.h +++ b/src/komodo_kv.h @@ -83,11 +83,15 @@ int32_t komodo_kvsearch(uint256 *pubkeyp,int32_t current_height,uint32_t *flagsp } //printf(" ptr->pubkey\n"); memcpy(pubkeyp,&ptr->pubkey,sizeof(*pubkeyp)); - if ( (retval= ptr->valuesize) != 0 ) + if ( (retval= ptr->valuesize) > 0 ) memcpy(value,ptr->value,retval); } } portable_mutex_unlock(&KOMODO_KV_mutex); + if ( retval < 0 ) + { + // search rawmempool + } return(retval); } From 6fc1969b951a00259cf74741b928cb48f8a61e3a Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 25 Apr 2017 18:07:32 +0300 Subject: [PATCH 07/36] Investigate kv crash --- src/komodo_kv.h | 5 +++++ src/wallet/wallet.cpp | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/komodo_kv.h b/src/komodo_kv.h index 4d2163941..3e03ca3af 100644 --- a/src/komodo_kv.h +++ b/src/komodo_kv.h @@ -104,6 +104,11 @@ void komodo_kvupdate(uint8_t *opretbuf,int32_t opretlen,uint64_t value) iguana_rwnum(0,&opretbuf[5],sizeof(height),&height); iguana_rwnum(0,&opretbuf[9],sizeof(flags),&flags); key = &opretbuf[13]; + if ( keylen+13 > opretlen ) + { + printf("komodo_kvupdate: keylen.%d + 13 > opretlen.%d\n",keylen,opretlen); + retrurn; + } valueptr = &key[keylen]; fee = komodo_kvfee(flags,opretlen,keylen); //printf("fee %.8f vs %.8f flags.%d keylen.%d valuesize.%d height.%d (%02x %02x %02x) (%02x %02x %02x)\n",(double)fee/COIN,(double)value/COIN,flags,keylen,valuesize,height,key[0],key[1],key[2],valueptr[0],valueptr[1],valueptr[2]); diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index b1f543d5d..d1b007805 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -2764,7 +2764,7 @@ bool CWallet::CreateTransaction(const vector& vecSend, CWalletTx& wt if ( KOMODO_EXCHANGEWALLET != 0 ) { //fprintf(stderr,"KOMODO_EXCHANGEWALLET disable interest sum %.8f, interest2 %.8f\n",(double)interest/COIN,(double)interest2/COIN); - interest = 0; + interest = 0; // interest2 also } CAmount nChange = (nValueIn - nValue + interest2); fprintf(stderr,"wallet change %.8f (%.8f - %.8f) interest %.8f interest2 %.8f total %.8f\n",(double)nChange/COIN,(double)nValueIn/COIN,(double)nValue/COIN,(double)interest2/COIN,(double)interest/COIN,(double)nTotalValue/COIN); From f2b068bd42d25c9d43777d21217a6791188d2f1b Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 25 Apr 2017 18:13:23 +0300 Subject: [PATCH 08/36] Test --- src/komodo_kv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/komodo_kv.h b/src/komodo_kv.h index 3e03ca3af..046863822 100644 --- a/src/komodo_kv.h +++ b/src/komodo_kv.h @@ -107,7 +107,7 @@ void komodo_kvupdate(uint8_t *opretbuf,int32_t opretlen,uint64_t value) if ( keylen+13 > opretlen ) { printf("komodo_kvupdate: keylen.%d + 13 > opretlen.%d\n",keylen,opretlen); - retrurn; + return; } valueptr = &key[keylen]; fee = komodo_kvfee(flags,opretlen,keylen); From 2825c0b5055896d2d8bb451192cf655fcd1f7d4c Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 26 Apr 2017 18:25:20 +0300 Subject: [PATCH 09/36] Mesh crash test --- src/miner.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/miner.cpp b/src/miner.cpp index 16a520128..21c74578c 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -708,8 +708,11 @@ void static BitcoinMiner() Mining_height = pindexPrev->nHeight+1; Mining_start = (uint32_t)time(NULL); } - if ( 0 && ASSETCHAINS_SYMBOL[0] != 0 ) + if ( ASSETCHAINS_SYMBOL[0] != 0 ) + { fprintf(stderr,"%s create new block ht.%d\n",ASSETCHAINS_SYMBOL,Mining_height); + sleep(3); + } #ifdef ENABLE_WALLET CBlockTemplate *ptr = CreateNewBlockWithKey(reservekey); #else @@ -862,6 +865,8 @@ void static BitcoinMiner() sleep(nseconds); MilliSleep((rand() % 1700) + 1); } + else if ( ASSETCHAINS_SYMBOL[0] != 0 ) + sleep(3); KOMODO_CHOSEN_ONE = 1; // Found a solution SetThreadPriority(THREAD_PRIORITY_NORMAL); From af50ce3fabf0826a924e344e53aa06a806337445 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 26 Apr 2017 18:48:53 +0300 Subject: [PATCH 10/36] Test --- src/wallet/wallet.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index d1b007805..f31a6214e 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -811,10 +811,10 @@ void CWallet::DecrementNoteWitnesses(const CBlockIndex* pindex) } if ( KOMODO_REWIND == 0 ) assert(nWitnessCacheSize > 0); - //if (fFileBacked) { - // CWalletDB walletdb(strWalletFile); - // WriteWitnessCache(walletdb); - //} + if (fFileBacked) { + CWalletDB walletdb(strWalletFile); + WriteWitnessCache(walletdb); + } // For performance reasons, we write out the witness cache in // CWallet::SetBestChain() (which also ensures that overall consistency // of the wallet.dat is maintained). From c7ede30fe0aaf571edbed877f275b98b5ade0f9f Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 26 Apr 2017 18:51:17 +0300 Subject: [PATCH 11/36] Test --- src/wallet/wallet.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index f31a6214e..d1b007805 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -811,10 +811,10 @@ void CWallet::DecrementNoteWitnesses(const CBlockIndex* pindex) } if ( KOMODO_REWIND == 0 ) assert(nWitnessCacheSize > 0); - if (fFileBacked) { - CWalletDB walletdb(strWalletFile); - WriteWitnessCache(walletdb); - } + //if (fFileBacked) { + // CWalletDB walletdb(strWalletFile); + // WriteWitnessCache(walletdb); + //} // For performance reasons, we write out the witness cache in // CWallet::SetBestChain() (which also ensures that overall consistency // of the wallet.dat is maintained). From 1a31463b3ddd31ebb7efc4f24b95d6cd4b297a39 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 26 Apr 2017 19:00:44 +0300 Subject: [PATCH 12/36] Test --- src/miner.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/miner.cpp b/src/miner.cpp index 21c74578c..c2eb5b8ff 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -451,6 +451,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn) return pblocktemplate.release(); } +/* #ifdef ENABLE_WALLET boost::optional GetMinerScriptPubKey(CReserveKey& reservekey) #else @@ -477,7 +478,7 @@ boost::optional GetMinerScriptPubKey() return scriptPubKey; } -/*#ifdef ENABLE_WALLET +#ifdef ENABLE_WALLET CBlockTemplate* CreateNewBlockWithKey(CReserveKey& reservekey) { boost::optional scriptPubKey = GetMinerScriptPubKey(reservekey); From 59e66272c8f5a090ea9782a52f3238a5862366ef Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 26 Apr 2017 19:05:57 +0300 Subject: [PATCH 13/36] Test --- src/wallet/wallet.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index ed7edbbc1..b45164300 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -59,7 +59,7 @@ static const unsigned int MAX_FREE_TRANSACTION_CREATE_SIZE = 1000; // Should be large enough that we can expect not to reorg beyond our cache // unless there is some exceptional network disruption. #define _COINBASE_MATURITY 100 -static const unsigned int WITNESS_CACHE_SIZE = _COINBASE_MATURITY+10; +static const unsigned int WITNESS_CACHE_SIZE = _COINBASE_MATURITY+1000; class CAccountingEntry; class CBlockIndex; From 45a93b635ea51f03aa985131a6d6fa0b80b7706b Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 26 Apr 2017 19:20:43 +0300 Subject: [PATCH 14/36] Test --- src/wallet/wallet.cpp | 5 +++-- src/wallet/wallet.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index d1b007805..d3ba06713 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -642,6 +642,7 @@ void CWallet::IncrementNoteWitnesses(const CBlockIndex* pindex, const CBlock* pblockIn, ZCIncrementalMerkleTree& tree) { + fprintf(stderr,"A increment witness cache -> %d\n",(int32_t)nWitnessCacheSize); { LOCK(cs_wallet); for (std::pair& wtxItem : mapWallet) { @@ -670,7 +671,7 @@ void CWallet::IncrementNoteWitnesses(const CBlockIndex* pindex, } } if (nWitnessCacheSize < WITNESS_CACHE_SIZE) { - //fprintf(stderr,"increment nWitnesscache -> %d\n",(int32_t)nWitnessCacheSize); + fprintf(stderr,"increment nWitnesscache -> %d\n",(int32_t)nWitnessCacheSize); nWitnessCacheSize += 1; } @@ -784,7 +785,7 @@ void CWallet::DecrementNoteWitnesses(const CBlockIndex* pindex) } } } - //fprintf(stderr,"decrement witness cache -> %d\n",(int32_t)nWitnessCacheSize); + fprintf(stderr,"decrement witness cache -> %d\n",(int32_t)nWitnessCacheSize); nWitnessCacheSize -= 1; for (std::pair& wtxItem : mapWallet) { for (mapNoteData_t::value_type& item : wtxItem.second.mapNoteData) { diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index b45164300..ed7edbbc1 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -59,7 +59,7 @@ static const unsigned int MAX_FREE_TRANSACTION_CREATE_SIZE = 1000; // Should be large enough that we can expect not to reorg beyond our cache // unless there is some exceptional network disruption. #define _COINBASE_MATURITY 100 -static const unsigned int WITNESS_CACHE_SIZE = _COINBASE_MATURITY+1000; +static const unsigned int WITNESS_CACHE_SIZE = _COINBASE_MATURITY+10; class CAccountingEntry; class CBlockIndex; From edfca062dfe5a610eb2edfa8d25736b2f8c89c55 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 26 Apr 2017 19:24:27 +0300 Subject: [PATCH 15/36] Test --- src/miner.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/miner.cpp b/src/miner.cpp index c2eb5b8ff..25e575eb0 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -644,8 +644,8 @@ void static BitcoinMiner() while ( (ASSETCHAIN_INIT == 0 || KOMODO_INITDONE == 0) ) //chainActive.Tip()->nHeight != 235300 && { sleep(1); - if ( komodo_baseid(ASSETCHAINS_SYMBOL) < 0 ) - break; + //if ( komodo_baseid(ASSETCHAINS_SYMBOL) < 0 ) + // break; } komodo_chosennotary(¬aryid,chainActive.Tip()->nHeight,NOTARY_PUBKEY33); From 4e624c04521e54c8f8eecf3347fa94f627a62d9a Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 26 Apr 2017 19:29:36 +0300 Subject: [PATCH 16/36] Test --- src/komodo.h | 2 +- src/komodo_bitcoind.h | 1 + src/miner.cpp | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/komodo.h b/src/komodo.h index 663edb1e2..eed3e8355 100644 --- a/src/komodo.h +++ b/src/komodo.h @@ -497,7 +497,7 @@ void komodo_connectblock(CBlockIndex *pindex,CBlock& block) fprintf(stderr,"unexpected null komodostateptr.[%s]\n",ASSETCHAINS_SYMBOL); return; } - //fprintf(stderr,"%s connect.%d\n",ASSETCHAINS_SYMBOL,pindex->nHeight); + fprintf(stderr,"%s connect.%d\n",ASSETCHAINS_SYMBOL,pindex->nHeight); numnotaries = komodo_notaries(pubkeys,pindex->nHeight); calc_rmd160_sha256(rmd160,pubkeys[0],33); if ( pindex->nHeight > hwmheight ) diff --git a/src/komodo_bitcoind.h b/src/komodo_bitcoind.h index 72eac6305..5e576405a 100644 --- a/src/komodo_bitcoind.h +++ b/src/komodo_bitcoind.h @@ -553,6 +553,7 @@ uint32_t komodo_txtime(uint256 hash) void komodo_disconnect(CBlockIndex *pindex,CBlock& block) { char symbol[16],dest[16]; struct komodo_state *sp; + fprintf(stderr,"disconnect ht.%d\n",pindex->nHeight); komodo_init(pindex->nHeight); if ( (sp= komodo_stateptr(symbol,dest)) != 0 ) { diff --git a/src/miner.cpp b/src/miner.cpp index 25e575eb0..c2eb5b8ff 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -644,8 +644,8 @@ void static BitcoinMiner() while ( (ASSETCHAIN_INIT == 0 || KOMODO_INITDONE == 0) ) //chainActive.Tip()->nHeight != 235300 && { sleep(1); - //if ( komodo_baseid(ASSETCHAINS_SYMBOL) < 0 ) - // break; + if ( komodo_baseid(ASSETCHAINS_SYMBOL) < 0 ) + break; } komodo_chosennotary(¬aryid,chainActive.Tip()->nHeight,NOTARY_PUBKEY33); From cc83230c1cd0dd086552f98928d6eb695da42de7 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 26 Apr 2017 22:32:29 +0300 Subject: [PATCH 17/36] Test --- src/miner.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/miner.cpp b/src/miner.cpp index c2eb5b8ff..97b59b3c3 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -645,7 +645,10 @@ void static BitcoinMiner() { sleep(1); if ( komodo_baseid(ASSETCHAINS_SYMBOL) < 0 ) + { + sleep(60); break; + } } komodo_chosennotary(¬aryid,chainActive.Tip()->nHeight,NOTARY_PUBKEY33); From b7ba6413b612f73e74016c9f9cf556a9d24f39e6 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 26 Apr 2017 22:34:31 +0300 Subject: [PATCH 18/36] Test --- src/miner.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/miner.cpp b/src/miner.cpp index 97b59b3c3..fc10cf7e9 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -641,15 +641,13 @@ void static BitcoinMiner() unsigned int n = chainparams.EquihashN(); unsigned int k = chainparams.EquihashK(); int32_t notaryid = -1; - while ( (ASSETCHAIN_INIT == 0 || KOMODO_INITDONE == 0) ) //chainActive.Tip()->nHeight != 235300 && + while ( (ASSETCHAIN_INIT == 0 || KOMODO_INITDONE == 0) ) //chainActive.Tip()->nHeight != 235300 && { sleep(1); if ( komodo_baseid(ASSETCHAINS_SYMBOL) < 0 ) - { - sleep(60); break; - } } + sleep(60); komodo_chosennotary(¬aryid,chainActive.Tip()->nHeight,NOTARY_PUBKEY33); std::string solver; From 763b14572ac4d2ebf4cdba74dfec805182b0e047 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 26 Apr 2017 22:40:39 +0300 Subject: [PATCH 19/36] Test --- src/main.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main.cpp b/src/main.cpp index c0414e757..35fd15703 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2231,6 +2231,7 @@ static int64_t nTimeTotal = 0; bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pindex, CCoinsViewCache& view, bool fJustCheck) { const CChainParams& chainparams = Params(); + fprintf(stderr,"connectblock ht.%d\n",(int32_t)pindex->nHeight); AssertLockHeld(cs_main); /*<<<<<<< HEA // Check it again in case a previous version let a bad block in From 3e5136cee92cfb797abca9495bcaee02f9bb80f4 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 26 Apr 2017 22:52:10 +0300 Subject: [PATCH 20/36] Test --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 35fd15703..9fe3603b6 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1565,7 +1565,7 @@ bool IsInitialBlockDownload() if ( ASSETCHAINS_SYMBOL[0] == 0 ) state = ((chainActive.Height() < ptr->nHeight - 24*60) || ptr->GetBlockTime() < (GetTime() - chainParams.MaxTipAge())); - else state = (chainActive.Height() < ptr->nHeight - 3); + else state = (chainActive.Height() < ptr->nHeight - 99); //fprintf(stderr,"state.%d ht.%d vs %d, t.%u %u\n",state,(int32_t)chainActive.Height(),(uint32_t)ptr->nHeight,(int32_t)ptr->GetBlockTime(),(uint32_t)(GetTime() - chainParams.MaxTipAge())); if (!state) { From 4212100ea1b872287e3cfc6aef4783941c720719 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 26 Apr 2017 22:54:12 +0300 Subject: [PATCH 21/36] Test --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 9fe3603b6..c8933f8b5 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1565,7 +1565,7 @@ bool IsInitialBlockDownload() if ( ASSETCHAINS_SYMBOL[0] == 0 ) state = ((chainActive.Height() < ptr->nHeight - 24*60) || ptr->GetBlockTime() < (GetTime() - chainParams.MaxTipAge())); - else state = (chainActive.Height() < ptr->nHeight - 99); + else state = (chainActive.Height() < ptr->nHeight - 24*60); //fprintf(stderr,"state.%d ht.%d vs %d, t.%u %u\n",state,(int32_t)chainActive.Height(),(uint32_t)ptr->nHeight,(int32_t)ptr->GetBlockTime(),(uint32_t)(GetTime() - chainParams.MaxTipAge())); if (!state) { From 952b990570575fc0338475f3d28846c220ee4a45 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 26 Apr 2017 23:00:30 +0300 Subject: [PATCH 22/36] Test --- src/main.cpp | 2 ++ src/miner.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index c8933f8b5..5c818ec4a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2660,6 +2660,7 @@ bool static DisconnectTip(CValidationState &state) { SyncWithWallets(tx, NULL); } // Update cached incremental witnesses + fprintf(stderr,"chaintip false\n"); GetMainSignals().ChainTip(pindexDelete, &block, newTree, false); return true; } @@ -2730,6 +2731,7 @@ bool static ConnectTip(CValidationState &state, CBlockIndex *pindexNew, CBlock * SyncWithWallets(tx, pblock); } // Update cached incremental witnesses + fprintf(stderr,"chaintip true\n"); GetMainSignals().ChainTip(pindexNew, pblock, oldTree, true); int64_t nTime6 = GetTimeMicros(); nTimePostConnect += nTime6 - nTime5; nTimeTotal += nTime6 - nTime1; diff --git a/src/miner.cpp b/src/miner.cpp index fc10cf7e9..35e006e18 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -647,7 +647,7 @@ void static BitcoinMiner() if ( komodo_baseid(ASSETCHAINS_SYMBOL) < 0 ) break; } - sleep(60); + //sleep(60); komodo_chosennotary(¬aryid,chainActive.Tip()->nHeight,NOTARY_PUBKEY33); std::string solver; From d1d08494e9c0813c754041f262ae0b78e8f28ba5 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 26 Apr 2017 23:06:33 +0300 Subject: [PATCH 23/36] Test --- src/miner.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/miner.cpp b/src/miner.cpp index 35e006e18..136769eb1 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -746,8 +746,8 @@ void static BitcoinMiner() static uint32_t counter; if ( counter++ < 10 ) fprintf(stderr,"skip generating %s on-demand block, no tx avail\n",ASSETCHAINS_SYMBOL); - sleep(10); - continue; + sleep(60); + //continue; } else fprintf(stderr,"%s vouts.%d mining.%d vs %d\n",ASSETCHAINS_SYMBOL,(int32_t)pblock->vtx[0].vout.size(),Mining_height,ASSETCHAINS_MINHEIGHT); } IncrementExtraNonce(pblock, pindexPrev, nExtraNonce); From 1e3f8b44fe635d75f3140855ac665f29cbce9760 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 26 Apr 2017 23:10:31 +0300 Subject: [PATCH 24/36] Test --- src/miner.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/miner.cpp b/src/miner.cpp index 136769eb1..d76a9931a 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -597,6 +597,7 @@ static bool ProcessBlockFound(CBlock* pblock) } } // Track how many getdata requests this block gets + if ( 0 ) { LOCK(wallet.cs_wallet); wallet.mapRequestCount[pblock->GetHash()] = 0; From 438ba9c17d9493f40c3c5e6e720d5a7a24f6e390 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 26 Apr 2017 23:14:14 +0300 Subject: [PATCH 25/36] Test --- src/main.cpp | 2 +- src/miner.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 5c818ec4a..97d2cbd8b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1565,7 +1565,7 @@ bool IsInitialBlockDownload() if ( ASSETCHAINS_SYMBOL[0] == 0 ) state = ((chainActive.Height() < ptr->nHeight - 24*60) || ptr->GetBlockTime() < (GetTime() - chainParams.MaxTipAge())); - else state = (chainActive.Height() < ptr->nHeight - 24*60); + else state = (chainActive.Height() < ptr->nHeight - 10); //fprintf(stderr,"state.%d ht.%d vs %d, t.%u %u\n",state,(int32_t)chainActive.Height(),(uint32_t)ptr->nHeight,(int32_t)ptr->GetBlockTime(),(uint32_t)(GetTime() - chainParams.MaxTipAge())); if (!state) { diff --git a/src/miner.cpp b/src/miner.cpp index d76a9931a..4d815639a 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -597,7 +597,7 @@ static bool ProcessBlockFound(CBlock* pblock) } } // Track how many getdata requests this block gets - if ( 0 ) + //if ( 0 ) { LOCK(wallet.cs_wallet); wallet.mapRequestCount[pblock->GetHash()] = 0; From 4c73b58b834a841087f9f7528b4c2e8376245a86 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 26 Apr 2017 23:21:53 +0300 Subject: [PATCH 26/36] Test --- src/wallet/wallet.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index d3ba06713..7f694fc5b 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -786,7 +786,13 @@ void CWallet::DecrementNoteWitnesses(const CBlockIndex* pindex) } } fprintf(stderr,"decrement witness cache -> %d\n",(int32_t)nWitnessCacheSize); - nWitnessCacheSize -= 1; + if ( nWitnessCacheSize > 0 ) + nWitnessCacheSize -= 1; + else + { + extern char ASSETCHAINS_SYMBOL[16]; + fprintf(stderr,"%s nWitnessCacheSize.%d\n",ASSETCHAINS_SYMBOL,(int32_t)nWitnessCacheSize); + } for (std::pair& wtxItem : mapWallet) { for (mapNoteData_t::value_type& item : wtxItem.second.mapNoteData) { CNoteData* nd = &(item.second); @@ -805,11 +811,6 @@ void CWallet::DecrementNoteWitnesses(const CBlockIndex* pindex) } } } - if ( nWitnessCacheSize <= 0 ) - { - extern char ASSETCHAINS_SYMBOL[16]; - fprintf(stderr,"%s nWitnessCacheSize.%d\n",ASSETCHAINS_SYMBOL,(int32_t)nWitnessCacheSize); - } if ( KOMODO_REWIND == 0 ) assert(nWitnessCacheSize > 0); //if (fFileBacked) { From de939fbb372f8143e3aa4135a1a89e84ab5ffe3a Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 26 Apr 2017 23:24:49 +0300 Subject: [PATCH 27/36] Test --- src/miner.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/miner.cpp b/src/miner.cpp index 4d815639a..489b4e26f 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -747,8 +747,8 @@ void static BitcoinMiner() static uint32_t counter; if ( counter++ < 10 ) fprintf(stderr,"skip generating %s on-demand block, no tx avail\n",ASSETCHAINS_SYMBOL); - sleep(60); - //continue; + sleep(10); + continue; } else fprintf(stderr,"%s vouts.%d mining.%d vs %d\n",ASSETCHAINS_SYMBOL,(int32_t)pblock->vtx[0].vout.size(),Mining_height,ASSETCHAINS_MINHEIGHT); } IncrementExtraNonce(pblock, pindexPrev, nExtraNonce); From 1066247f1fd57bced0c19b749854353810edf03f Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 26 Apr 2017 23:26:14 +0300 Subject: [PATCH 28/36] Test --- src/wallet/wallet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 7f694fc5b..525b2b5e6 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -786,7 +786,7 @@ void CWallet::DecrementNoteWitnesses(const CBlockIndex* pindex) } } fprintf(stderr,"decrement witness cache -> %d\n",(int32_t)nWitnessCacheSize); - if ( nWitnessCacheSize > 0 ) + if ( nWitnessCacheSize > 1 ) nWitnessCacheSize -= 1; else { From e2398ee80fd587fd100315d3ed1470e9de5a22a7 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 27 Apr 2017 09:20:57 +0300 Subject: [PATCH 29/36] Test --- src/wallet/wallet.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 525b2b5e6..03d8c9722 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -38,6 +38,7 @@ bool bSpendZeroConfChange = true; bool fSendFreeTransactions = false; bool fPayAtLeastCustomFee = true; extern int32_t KOMODO_EXCHANGEWALLET; +extern char ASSETCHAINS_SYMBOL[16]; /** * Fees smaller than this (in satoshi) are considered zero fee (for transaction creation) @@ -373,9 +374,9 @@ void CWallet::ChainTip(const CBlockIndex *pindex, const CBlock *pblock, { if (added) { IncrementNoteWitnesses(pindex, pblock, tree); - } else { + } else if ( ASSETCHAINS_SYMBOL[0] == 0 || nWitnessCacheSize > 1 ){ DecrementNoteWitnesses(pindex); - } + } else fprintf(stderr,"would have decremented %s nWitnessCacheSize.%d\n",ASSETCHAINS_SYMBOL,nWitnessCacheSize); } void CWallet::SetBestChain(const CBlockLocator& loc) @@ -790,7 +791,6 @@ void CWallet::DecrementNoteWitnesses(const CBlockIndex* pindex) nWitnessCacheSize -= 1; else { - extern char ASSETCHAINS_SYMBOL[16]; fprintf(stderr,"%s nWitnessCacheSize.%d\n",ASSETCHAINS_SYMBOL,(int32_t)nWitnessCacheSize); } for (std::pair& wtxItem : mapWallet) { @@ -2242,7 +2242,6 @@ void CWallet::AvailableCoins(vector& vCoins, bool fOnlyConfirmed, const { if ( KOMODO_EXCHANGEWALLET == 0 ) { - extern char ASSETCHAINS_SYMBOL[16]; uint32_t locktime; int32_t txheight; CBlockIndex *tipindex; if ( ASSETCHAINS_SYMBOL[0] == 0 && chainActive.Tip() != 0 && chainActive.Tip()->nHeight >= 60000 ) { @@ -3727,7 +3726,6 @@ int CMerkleTx::GetDepthInMainChain(const CBlockIndex* &pindexRet) const int CMerkleTx::GetBlocksToMaturity() const { - extern char ASSETCHAINS_SYMBOL[]; if ( ASSETCHAINS_SYMBOL[0] == 0 ) COINBASE_MATURITY = _COINBASE_MATURITY; if (!IsCoinBase()) From ab49ccacba3256ac441ccb6dc78dc9abc653a98d Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 27 Apr 2017 09:21:53 +0300 Subject: [PATCH 30/36] Test --- src/wallet/wallet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 03d8c9722..148ebe30e 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -376,7 +376,7 @@ void CWallet::ChainTip(const CBlockIndex *pindex, const CBlock *pblock, IncrementNoteWitnesses(pindex, pblock, tree); } else if ( ASSETCHAINS_SYMBOL[0] == 0 || nWitnessCacheSize > 1 ){ DecrementNoteWitnesses(pindex); - } else fprintf(stderr,"would have decremented %s nWitnessCacheSize.%d\n",ASSETCHAINS_SYMBOL,nWitnessCacheSize); + } else fprintf(stderr,"would have decremented %s nWitnessCacheSize.%d\n",ASSETCHAINS_SYMBOL,(int32_t)nWitnessCacheSize); } void CWallet::SetBestChain(const CBlockLocator& loc) From e0440cc39cef6315df73ca33c4ec9ae119ca71c3 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 27 Apr 2017 09:27:22 +0300 Subject: [PATCH 31/36] Test --- src/komodo.h | 2 +- src/komodo_bitcoind.h | 2 +- src/main.cpp | 6 +++--- src/wallet/wallet.cpp | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/komodo.h b/src/komodo.h index eed3e8355..663edb1e2 100644 --- a/src/komodo.h +++ b/src/komodo.h @@ -497,7 +497,7 @@ void komodo_connectblock(CBlockIndex *pindex,CBlock& block) fprintf(stderr,"unexpected null komodostateptr.[%s]\n",ASSETCHAINS_SYMBOL); return; } - fprintf(stderr,"%s connect.%d\n",ASSETCHAINS_SYMBOL,pindex->nHeight); + //fprintf(stderr,"%s connect.%d\n",ASSETCHAINS_SYMBOL,pindex->nHeight); numnotaries = komodo_notaries(pubkeys,pindex->nHeight); calc_rmd160_sha256(rmd160,pubkeys[0],33); if ( pindex->nHeight > hwmheight ) diff --git a/src/komodo_bitcoind.h b/src/komodo_bitcoind.h index 5e576405a..08fb4be51 100644 --- a/src/komodo_bitcoind.h +++ b/src/komodo_bitcoind.h @@ -553,7 +553,7 @@ uint32_t komodo_txtime(uint256 hash) void komodo_disconnect(CBlockIndex *pindex,CBlock& block) { char symbol[16],dest[16]; struct komodo_state *sp; - fprintf(stderr,"disconnect ht.%d\n",pindex->nHeight); + //fprintf(stderr,"disconnect ht.%d\n",pindex->nHeight); komodo_init(pindex->nHeight); if ( (sp= komodo_stateptr(symbol,dest)) != 0 ) { diff --git a/src/main.cpp b/src/main.cpp index 97d2cbd8b..05968b2ee 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2231,7 +2231,7 @@ static int64_t nTimeTotal = 0; bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pindex, CCoinsViewCache& view, bool fJustCheck) { const CChainParams& chainparams = Params(); - fprintf(stderr,"connectblock ht.%d\n",(int32_t)pindex->nHeight); + //fprintf(stderr,"connectblock ht.%d\n",(int32_t)pindex->nHeight); AssertLockHeld(cs_main); /*<<<<<<< HEA // Check it again in case a previous version let a bad block in @@ -2660,7 +2660,7 @@ bool static DisconnectTip(CValidationState &state) { SyncWithWallets(tx, NULL); } // Update cached incremental witnesses - fprintf(stderr,"chaintip false\n"); + //fprintf(stderr,"chaintip false\n"); GetMainSignals().ChainTip(pindexDelete, &block, newTree, false); return true; } @@ -2731,7 +2731,7 @@ bool static ConnectTip(CValidationState &state, CBlockIndex *pindexNew, CBlock * SyncWithWallets(tx, pblock); } // Update cached incremental witnesses - fprintf(stderr,"chaintip true\n"); + //fprintf(stderr,"chaintip true\n"); GetMainSignals().ChainTip(pindexNew, pblock, oldTree, true); int64_t nTime6 = GetTimeMicros(); nTimePostConnect += nTime6 - nTime5; nTimeTotal += nTime6 - nTime1; diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 148ebe30e..a18868dc2 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -643,7 +643,7 @@ void CWallet::IncrementNoteWitnesses(const CBlockIndex* pindex, const CBlock* pblockIn, ZCIncrementalMerkleTree& tree) { - fprintf(stderr,"A increment witness cache -> %d\n",(int32_t)nWitnessCacheSize); + //fprintf(stderr,"A increment witness cache -> %d\n",(int32_t)nWitnessCacheSize); { LOCK(cs_wallet); for (std::pair& wtxItem : mapWallet) { @@ -786,7 +786,7 @@ void CWallet::DecrementNoteWitnesses(const CBlockIndex* pindex) } } } - fprintf(stderr,"decrement witness cache -> %d\n",(int32_t)nWitnessCacheSize); + //fprintf(stderr,"decrement witness cache -> %d\n",(int32_t)nWitnessCacheSize); if ( nWitnessCacheSize > 1 ) nWitnessCacheSize -= 1; else From 5908165a3d02000c82ec9b29f43859af7021c4f6 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 27 Apr 2017 09:33:10 +0300 Subject: [PATCH 32/36] Test --- src/miner.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/miner.cpp b/src/miner.cpp index 489b4e26f..bcce6ebda 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -106,7 +106,7 @@ void UpdateTime(CBlockHeader* pblock, const Consensus::Params& consensusParams, pblock->nBits = GetNextWorkRequired(pindexPrev, pblock, consensusParams); } -#define ASSETCHAINS_MINHEIGHT 100 +#define ASSETCHAINS_MINHEIGHT 128 #define KOMODO_ELECTION_GAP 2000 #define ROUNDROBIN_DELAY 61 extern int32_t ASSETCHAINS_SEED,IS_KOMODO_NOTARY,USE_EXTERNAL_PUBKEY,KOMODO_CHOSEN_ONE,ASSETCHAIN_INIT,KOMODO_INITDONE,KOMODO_ON_DEMAND,KOMODO_INITDONE,KOMODO_PASSPORT_INITDONE; From 021c85c3297ca8e705a66edd3b28296abb4f2e1f Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 27 Apr 2017 11:02:29 +0300 Subject: [PATCH 33/36] Test --- src/assetchains | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/assetchains b/src/assetchains index a85cdbe38..7f278ba4e 100755 --- a/src/assetchains +++ b/src/assetchains @@ -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=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=MESH -ac_supply=1000007 -addnode=78.47.196.146 $1 -gen & +./komodod -pubkey=$pubkey -ac_name=MESH -ac_supply=1000006 -addnode=78.47.196.146 $1 -gen & sleep $delay ./komodod -pubkey=$pubkey -ac_name=USD -addnode=78.47.196.146 $1 & From 8415ccaaae8abc8e3ef15f643704cb65e85bc7a9 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 27 Apr 2017 13:41:28 +0300 Subject: [PATCH 34/36] Test --- src/wallet/wallet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index a18868dc2..13045f21e 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -672,7 +672,7 @@ void CWallet::IncrementNoteWitnesses(const CBlockIndex* pindex, } } if (nWitnessCacheSize < WITNESS_CACHE_SIZE) { - fprintf(stderr,"increment nWitnesscache -> %d\n",(int32_t)nWitnessCacheSize); + //fprintf(stderr,"increment nWitnesscache -> %d\n",(int32_t)nWitnessCacheSize); nWitnessCacheSize += 1; } From 403044796ed97118fd68c041884161d11a053ea6 Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 28 Apr 2017 15:16:39 +0300 Subject: [PATCH 35/36] Remove print --- src/miner.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/miner.cpp b/src/miner.cpp index bcce6ebda..3de85e5cf 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -713,7 +713,7 @@ void static BitcoinMiner() } if ( ASSETCHAINS_SYMBOL[0] != 0 ) { - fprintf(stderr,"%s create new block ht.%d\n",ASSETCHAINS_SYMBOL,Mining_height); + //fprintf(stderr,"%s create new block ht.%d\n",ASSETCHAINS_SYMBOL,Mining_height); sleep(3); } #ifdef ENABLE_WALLET From 0cba06b6e79b87c7316acc00a87c31542c957104 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 1 May 2017 23:56:06 +0300 Subject: [PATCH 36/36] Test --- src/komodo_kv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/komodo_kv.h b/src/komodo_kv.h index 046863822..d9fe722a4 100644 --- a/src/komodo_kv.h +++ b/src/komodo_kv.h @@ -187,7 +187,7 @@ void komodo_kvupdate(uint8_t *opretbuf,int32_t opretlen,uint64_t value) ptr->flags = flags | 1; portable_mutex_unlock(&KOMODO_KV_mutex); } //else printf("size mismatch %d vs %d\n",opretlen,coresize); - } else printf("insufficient fee %.8f vs %.8f flags.%d keylen.%d valuesize.%d height.%d (%02x %02x %02x) (%02x %02x %02x)\n",(double)fee/COIN,(double)value/COIN,flags,keylen,valuesize,height,key[0],key[1],key[2],valueptr[0],valueptr[1],valueptr[2]); + } } #endif