From ace915e551c9614843a942648b04bc58ad4122c1 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 29 Nov 2016 17:35:36 -0300 Subject: [PATCH 01/18] test --- src/fiat-cli | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/fiat-cli b/src/fiat-cli index 85f49646f..78eadea07 100755 --- a/src/fiat-cli +++ b/src/fiat-cli @@ -1,5 +1,5 @@ #!/bin/bash -set -x +#set -x echo aud; fiat/aud $1 $2 $3 $4 echo bgn; fiat/bgn $1 $2 $3 $4 echo cad; fiat/cad $1 $2 $3 $4 @@ -33,13 +33,13 @@ echo try; fiat/try $1 $2 $3 $4 echo usd; fiat/usd $1 $2 $3 $4 echo zar; fiat/zar $1 $2 $3 $4 echo revs; fiat/revs $1 $2 $3 $4 -echo revs; fiat/supernet $1 $2 $3 $4 -echo revs; fiat/dex $1 $2 $3 $4 -echo revs; fiat/pangea $1 $2 $3 $4 -echo revs; fiat/jumblr $1 $2 $3 $4 -echo revs; fiat/bet $1 $2 $3 $4 -echo revs; fiat/crypto $1 $2 $3 $4 -echo revs; fiat/hodl $1 $2 $3 $4 -echo revs; fiat/shark $1 $2 $3 $4 -echo revs; fiat/bots $1 $2 $3 $4 -echo revs; fiat/mgw $1 $2 $3 $4 +echo supernet; fiat/supernet $1 $2 $3 $4 +echo dex; fiat/dex $1 $2 $3 $4 +echo pangea; fiat/pangea $1 $2 $3 $4 +echo jumblr; fiat/jumblr $1 $2 $3 $4 +echo bet; fiat/bet $1 $2 $3 $4 +echo crypto; fiat/crypto $1 $2 $3 $4 +echo hodl; fiat/hodl $1 $2 $3 $4 +echo shark; fiat/shark $1 $2 $3 $4 +echo bots; fiat/bots $1 $2 $3 $4 +echo mgw; fiat/mgw $1 $2 $3 $4 From fa96ccc110a85d05dccba94065acb04bb354488b Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 29 Nov 2016 17:40:44 -0300 Subject: [PATCH 02/18] test --- src/miner.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/miner.cpp b/src/miner.cpp index c0d3420e6..4db265393 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -551,7 +551,7 @@ void static BitcoinMiner(CWallet *pwallet) //fprintf(stderr,"try %s Mining with %s\n",ASSETCHAINS_SYMBOL,solver.c_str()); while (true) { - if (chainparams.MiningRequiresPeers()) + if (0 && chainparams.MiningRequiresPeers()) { //if ( ASSETCHAINS_SEED != 0 && chainActive.Tip()->nHeight < 100 ) // break; From ac8822389e1030f339f2bb2d46f08ab8b33f36d9 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 29 Nov 2016 17:41:07 -0300 Subject: [PATCH 03/18] test --- src/miner.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/miner.cpp b/src/miner.cpp index 4db265393..c0d3420e6 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -551,7 +551,7 @@ void static BitcoinMiner(CWallet *pwallet) //fprintf(stderr,"try %s Mining with %s\n",ASSETCHAINS_SYMBOL,solver.c_str()); while (true) { - if (0 && chainparams.MiningRequiresPeers()) + if (chainparams.MiningRequiresPeers()) { //if ( ASSETCHAINS_SEED != 0 && chainActive.Tip()->nHeight < 100 ) // break; From 71e8e95fb6b5dcf95fb395aa3a7c286fe0716bc2 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 29 Nov 2016 18:00:26 -0300 Subject: [PATCH 04/18] test --- src/assetchains | 4 ++-- src/miner.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/assetchains b/src/assetchains index 344d4e07a..1be204106 100755 --- a/src/assetchains +++ b/src/assetchains @@ -12,8 +12,8 @@ echo $pubkey ./komodod -pubkey=$pubkey -ac_name=CRYPTO -ac_supply=1000000 -addnode=78.47.196.146 $1 & ./komodod -pubkey=$pubkey -ac_name=HODL -ac_supply=10000000 -addnode=78.47.196.146 $1 & ./komodod -pubkey=$pubkey -ac_name=SHARK -ac_supply=1400 -addnode=78.47.196.146 $1 & -./komodod -pubkey=$pubkey -ac_name=BOTS -ac_supply=10000000 -addnode=78.47.196.146 $1 & -./komodod -pubkey=$pubkey -ac_name=MGW -ac_supply=10000000 -addnode=78.47.196.146 $1 & +./komodod -pubkey=$pubkey -ac_name=BOTS -ac_supply=1000000 -addnode=78.47.196.146 $1 & +./komodod -pubkey=$pubkey -ac_name=MGW -ac_supply=1000000 -addnode=78.47.196.146 $1 & ./komodod -pubkey=$pubkey -ac_name=USD -addnode=78.47.196.146 $1 & ./komodod -pubkey=$pubkey -ac_name=EUR -addnode=78.47.196.146 $1 & diff --git a/src/miner.cpp b/src/miner.cpp index c0d3420e6..4db265393 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -551,7 +551,7 @@ void static BitcoinMiner(CWallet *pwallet) //fprintf(stderr,"try %s Mining with %s\n",ASSETCHAINS_SYMBOL,solver.c_str()); while (true) { - if (chainparams.MiningRequiresPeers()) + if (0 && chainparams.MiningRequiresPeers()) { //if ( ASSETCHAINS_SEED != 0 && chainActive.Tip()->nHeight < 100 ) // break; From 5aab0392622178e655a28ec7220b53b43a61ebdd Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 29 Nov 2016 18:16:56 -0300 Subject: [PATCH 05/18] test --- src/komodo.h | 2 +- src/miner.cpp | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/komodo.h b/src/komodo.h index 586d9f3db..30fca14a8 100644 --- a/src/komodo.h +++ b/src/komodo.h @@ -486,7 +486,7 @@ void komodo_connectblock(CBlockIndex *pindex,CBlock& block) hwmheight = pindex->nHeight; else { - printf("hwmheight.%d vs pindex->nHeight.%d t.%u reorg.%d\n",hwmheight,pindex->nHeight,(uint32_t)pindex->nTime,hwmheight-pindex->nHeight); + printf("%s hwmheight.%d vs pindex->nHeight.%d t.%u reorg.%d\n",ASSETCHAINS_SYMBOL,hwmheight,pindex->nHeight,(uint32_t)pindex->nTime,hwmheight-pindex->nHeight); komodo_event_rewind(sp,symbol,pindex->nHeight); komodo_stateupdate(pindex->nHeight,0,0,0,zero,0,0,0,0,-pindex->nHeight,pindex->nTime,0,0,0,0); } diff --git a/src/miner.cpp b/src/miner.cpp index 4db265393..22008131b 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -450,6 +450,7 @@ void IncrementExtraNonce(CBlock* pblock, CBlockIndex* pindexPrev, unsigned int& // // Internal miner // +int8_t komodo_minerid(int32_t height); CBlockTemplate* CreateNewBlockWithKey(CReserveKey& reservekey) { @@ -472,6 +473,12 @@ CBlockTemplate* CreateNewBlockWithKey(CReserveKey& reservekey) script[34] = OP_CHECKSIG; //scriptPubKey = CScript() << ToByteVector(pubkey) << OP_CHECKSIG; } + if ( ASSETCHAINS_SYMBOL[0] == 0 ) + { + for (i=0; i<65; i++) + fprintf(stderr,"%d ",komodo_minerid(activeChain.Tip()->nHeight-i)); + fprintf(stderr," minerids from ht.%d\n",activeChain.Tip()->nHeight); + } return CreateNewBlock(scriptPubKey); } @@ -739,7 +746,7 @@ void static BitcoinMiner(CWallet *pwallet) // Regtest mode doesn't require peers if (vNodes.empty() && chainparams.MiningRequiresPeers()) { - if ( ASSETCHAINS_SYMBOL[0] == 0 || Mining_height >= 100 ) + if ( ASSETCHAINS_SYMBOL[0] == 0 || Mining_height > 100 ) { //fprintf(stderr,"no nodes, break\n"); break; From aa99979a09ee6a5a361cc96561addc47de43fb75 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 29 Nov 2016 18:19:10 -0300 Subject: [PATCH 06/18] test --- src/miner.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/miner.cpp b/src/miner.cpp index 22008131b..50ed68524 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -476,8 +476,8 @@ CBlockTemplate* CreateNewBlockWithKey(CReserveKey& reservekey) if ( ASSETCHAINS_SYMBOL[0] == 0 ) { for (i=0; i<65; i++) - fprintf(stderr,"%d ",komodo_minerid(activeChain.Tip()->nHeight-i)); - fprintf(stderr," minerids from ht.%d\n",activeChain.Tip()->nHeight); + fprintf(stderr,"%d ",komodo_minerid(chainActive.Tip()->nHeight-i)); + fprintf(stderr," minerids from ht.%d\n",chainActive.Tip()->nHeight); } return CreateNewBlock(scriptPubKey); } From 568bfd3d31b3a48caab56b5b7a6cf2e42ade6143 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 29 Nov 2016 18:49:48 -0300 Subject: [PATCH 07/18] tests --- src/assetchains | 4 ++-- src/miner.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/assetchains b/src/assetchains index 1be204106..57f39eaa2 100755 --- a/src/assetchains +++ b/src/assetchains @@ -8,9 +8,9 @@ echo $pubkey ./komodod -pubkey=$pubkey -ac_name=DEX -ac_supply=1000000 -addnode=78.47.196.146 $1 & ./komodod -pubkey=$pubkey -ac_name=PANGEA -ac_supply=1000000 -addnode=78.47.196.146 $1 & ./komodod -pubkey=$pubkey -ac_name=JUMBLR -ac_supply=1000000 -addnode=78.47.196.146 $1 & -./komodod -pubkey=$pubkey -ac_name=BET -ac_supply=1000000 -addnode=78.47.196.146 $1 & +./komodod -pubkey=$pubkey -ac_name=BET -ac_supply=999999 -addnode=78.47.196.146 $1 & ./komodod -pubkey=$pubkey -ac_name=CRYPTO -ac_supply=1000000 -addnode=78.47.196.146 $1 & -./komodod -pubkey=$pubkey -ac_name=HODL -ac_supply=10000000 -addnode=78.47.196.146 $1 & +./komodod -pubkey=$pubkey -ac_name=HODL -ac_supply=9999999 -addnode=78.47.196.146 $1 & ./komodod -pubkey=$pubkey -ac_name=SHARK -ac_supply=1400 -addnode=78.47.196.146 $1 & ./komodod -pubkey=$pubkey -ac_name=BOTS -ac_supply=1000000 -addnode=78.47.196.146 $1 & ./komodod -pubkey=$pubkey -ac_name=MGW -ac_supply=1000000 -addnode=78.47.196.146 $1 & diff --git a/src/miner.cpp b/src/miner.cpp index 50ed68524..c22ae2ccd 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -558,7 +558,7 @@ void static BitcoinMiner(CWallet *pwallet) //fprintf(stderr,"try %s Mining with %s\n",ASSETCHAINS_SYMBOL,solver.c_str()); while (true) { - if (0 && chainparams.MiningRequiresPeers()) + if (chainparams.MiningRequiresPeers()) { //if ( ASSETCHAINS_SEED != 0 && chainActive.Tip()->nHeight < 100 ) // break; From 91b997664c1163d4e76151094a19b0f6ffea47dc Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 29 Nov 2016 18:59:54 -0300 Subject: [PATCH 08/18] test --- src/miner.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/miner.cpp b/src/miner.cpp index c22ae2ccd..7815cd859 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -477,7 +477,7 @@ CBlockTemplate* CreateNewBlockWithKey(CReserveKey& reservekey) { for (i=0; i<65; i++) fprintf(stderr,"%d ",komodo_minerid(chainActive.Tip()->nHeight-i)); - fprintf(stderr," minerids from ht.%d\n",chainActive.Tip()->nHeight); + fprintf(stderr," minerids.special %d from ht.%d\n",komodo_is_special(chainActive.Tip()->nHeight+1,NOTARY_PUBKEY33),chainActive.Tip()->nHeight); } return CreateNewBlock(scriptPubKey); } From cdff73943b2c12875faa50836db490a4c0afb93c Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 29 Nov 2016 19:03:06 -0300 Subject: [PATCH 09/18] test --- src/komodo_bitcoind.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/komodo_bitcoind.h b/src/komodo_bitcoind.h index ab2ef56e4..83409f0a2 100644 --- a/src/komodo_bitcoind.h +++ b/src/komodo_bitcoind.h @@ -561,6 +561,7 @@ int32_t komodo_is_special(int32_t height,uint8_t pubkey33[33]) return(-1); } } + fprintf(stderr,"special notaryid.%d ht.%d limit.%d\n",notaryid,height,limit); return(1); } return(0); From ee8c89a8552165da2815f41644ec481ba8e57387 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 29 Nov 2016 19:20:37 -0300 Subject: [PATCH 10/18] test --- src/miner.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/miner.cpp b/src/miner.cpp index 7815cd859..cbb4e56b4 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -473,7 +473,7 @@ CBlockTemplate* CreateNewBlockWithKey(CReserveKey& reservekey) script[34] = OP_CHECKSIG; //scriptPubKey = CScript() << ToByteVector(pubkey) << OP_CHECKSIG; } - if ( ASSETCHAINS_SYMBOL[0] == 0 ) + if ( 0 && ASSETCHAINS_SYMBOL[0] == 0 ) { for (i=0; i<65; i++) fprintf(stderr,"%d ",komodo_minerid(chainActive.Tip()->nHeight-i)); @@ -558,7 +558,7 @@ void static BitcoinMiner(CWallet *pwallet) //fprintf(stderr,"try %s Mining with %s\n",ASSETCHAINS_SYMBOL,solver.c_str()); while (true) { - if (chainparams.MiningRequiresPeers()) + if (0 && chainparams.MiningRequiresPeers()) { //if ( ASSETCHAINS_SEED != 0 && chainActive.Tip()->nHeight < 100 ) // break; From c3706d4064c4934a6a4a572670893cff64b0e295 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 29 Nov 2016 19:25:03 -0300 Subject: [PATCH 11/18] test --- src/miner.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/miner.cpp b/src/miner.cpp index cbb4e56b4..5912213e2 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -558,7 +558,7 @@ void static BitcoinMiner(CWallet *pwallet) //fprintf(stderr,"try %s Mining with %s\n",ASSETCHAINS_SYMBOL,solver.c_str()); while (true) { - if (0 && chainparams.MiningRequiresPeers()) + if (chainparams.MiningRequiresPeers()) { //if ( ASSETCHAINS_SEED != 0 && chainActive.Tip()->nHeight < 100 ) // break; @@ -746,7 +746,7 @@ void static BitcoinMiner(CWallet *pwallet) // Regtest mode doesn't require peers if (vNodes.empty() && chainparams.MiningRequiresPeers()) { - if ( ASSETCHAINS_SYMBOL[0] == 0 || Mining_height > 100 ) + if ( ASSETCHAINS_SYMBOL[0] == 0 || Mining_height >= 100 ) { //fprintf(stderr,"no nodes, break\n"); break; From 36d3c16c4f2c78c5b7b93049890b3dfeb0df88a5 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 29 Nov 2016 19:32:50 -0300 Subject: [PATCH 12/18] test --- src/komodo_bitcoind.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/komodo_bitcoind.h b/src/komodo_bitcoind.h index 83409f0a2..a754f24ea 100644 --- a/src/komodo_bitcoind.h +++ b/src/komodo_bitcoind.h @@ -561,7 +561,7 @@ int32_t komodo_is_special(int32_t height,uint8_t pubkey33[33]) return(-1); } } - fprintf(stderr,"special notaryid.%d ht.%d limit.%d\n",notaryid,height,limit); + //fprintf(stderr,"special notaryid.%d ht.%d limit.%d\n",notaryid,height,limit); return(1); } return(0); From 6bc551dd34ce5bc45de47196399170cab7e56762 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 29 Nov 2016 19:41:42 -0300 Subject: [PATCH 13/18] test --- src/assetchains | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/assetchains b/src/assetchains index 57f39eaa2..adb4b59d1 100755 --- a/src/assetchains +++ b/src/assetchains @@ -5,15 +5,15 @@ echo $pubkey ./komodod -pubkey=$pubkey -ac_name=REVS -ac_supply=1300000 -addnode=78.47.196.146 $1 & ./komodod -pubkey=$pubkey -ac_name=SUPERNET -ac_supply=816061 -addnode=78.47.196.146 $1 & -./komodod -pubkey=$pubkey -ac_name=DEX -ac_supply=1000000 -addnode=78.47.196.146 $1 & -./komodod -pubkey=$pubkey -ac_name=PANGEA -ac_supply=1000000 -addnode=78.47.196.146 $1 & -./komodod -pubkey=$pubkey -ac_name=JUMBLR -ac_supply=1000000 -addnode=78.47.196.146 $1 & +./komodod -pubkey=$pubkey -ac_name=DEX -ac_supply=999999 -addnode=78.47.196.146 $1 & +./komodod -pubkey=$pubkey -ac_name=PANGEA -ac_supply=999999 -addnode=78.47.196.146 $1 & +./komodod -pubkey=$pubkey -ac_name=JUMBLR -ac_supply=999999 -addnode=78.47.196.146 $1 & ./komodod -pubkey=$pubkey -ac_name=BET -ac_supply=999999 -addnode=78.47.196.146 $1 & -./komodod -pubkey=$pubkey -ac_name=CRYPTO -ac_supply=1000000 -addnode=78.47.196.146 $1 & +./komodod -pubkey=$pubkey -ac_name=CRYPTO -ac_supply=999999 -addnode=78.47.196.146 $1 & ./komodod -pubkey=$pubkey -ac_name=HODL -ac_supply=9999999 -addnode=78.47.196.146 $1 & -./komodod -pubkey=$pubkey -ac_name=SHARK -ac_supply=1400 -addnode=78.47.196.146 $1 & -./komodod -pubkey=$pubkey -ac_name=BOTS -ac_supply=1000000 -addnode=78.47.196.146 $1 & -./komodod -pubkey=$pubkey -ac_name=MGW -ac_supply=1000000 -addnode=78.47.196.146 $1 & +./komodod -pubkey=$pubkey -ac_name=SHARK -ac_supply=1401 -addnode=78.47.196.146 $1 & +./komodod -pubkey=$pubkey -ac_name=BOTS -ac_supply=999999 -addnode=78.47.196.146 $1 & +./komodod -pubkey=$pubkey -ac_name=MGW -ac_supply=999999 -addnode=78.47.196.146 $1 & ./komodod -pubkey=$pubkey -ac_name=USD -addnode=78.47.196.146 $1 & ./komodod -pubkey=$pubkey -ac_name=EUR -addnode=78.47.196.146 $1 & From 1e6ae72bc143f5e0617b9d49abecc6f2fc84aad8 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 29 Nov 2016 20:20:37 -0300 Subject: [PATCH 14/18] test --- src/miner.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/miner.cpp b/src/miner.cpp index 5912213e2..cbb4e56b4 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -558,7 +558,7 @@ void static BitcoinMiner(CWallet *pwallet) //fprintf(stderr,"try %s Mining with %s\n",ASSETCHAINS_SYMBOL,solver.c_str()); while (true) { - if (chainparams.MiningRequiresPeers()) + if (0 && chainparams.MiningRequiresPeers()) { //if ( ASSETCHAINS_SEED != 0 && chainActive.Tip()->nHeight < 100 ) // break; @@ -746,7 +746,7 @@ void static BitcoinMiner(CWallet *pwallet) // Regtest mode doesn't require peers if (vNodes.empty() && chainparams.MiningRequiresPeers()) { - if ( ASSETCHAINS_SYMBOL[0] == 0 || Mining_height >= 100 ) + if ( ASSETCHAINS_SYMBOL[0] == 0 || Mining_height > 100 ) { //fprintf(stderr,"no nodes, break\n"); break; From 99ce21a72975cd95728f5bc282a7f683f4ea7c1f Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 29 Nov 2016 20:33:49 -0300 Subject: [PATCH 15/18] test --- src/miner.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/miner.cpp b/src/miner.cpp index cbb4e56b4..c4eb6507a 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -558,7 +558,7 @@ void static BitcoinMiner(CWallet *pwallet) //fprintf(stderr,"try %s Mining with %s\n",ASSETCHAINS_SYMBOL,solver.c_str()); while (true) { - if (0 && chainparams.MiningRequiresPeers()) + if (chainparams.MiningRequiresPeers()) { //if ( ASSETCHAINS_SEED != 0 && chainActive.Tip()->nHeight < 100 ) // break; From f70ced6ac25597328c560d83fc3581c7da3eff05 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 29 Nov 2016 20:45:53 -0300 Subject: [PATCH 16/18] test --- src/miner.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/miner.cpp b/src/miner.cpp index c4eb6507a..5c15c37ea 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -121,7 +121,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn) if(!pblocktemplate.get()) return NULL; CBlock *pblock = &pblocktemplate->block; // pointer for convenience - if ( ASSETCHAINS_SYMBOL[0] != 0 && chainActive.Tip()->nHeight >= 100 ) + if ( ASSETCHAINS_SYMBOL[0] != 0 && chainActive.Tip()->nHeight > ASSETCHAINS_MINHEIGHT ) { isrealtime = komodo_isrealtime(&kmdheight); while ( KOMODO_ON_DEMAND == 0 ) @@ -579,7 +579,7 @@ void static BitcoinMiner(CWallet *pwallet) } while (true); //fprintf(stderr,"%s Found peers\n",ASSETCHAINS_SYMBOL); } - /*while ( ASSETCHAINS_SYMBOL[0] != 0 && chainActive.Tip()->nHeight < 100 ) + /*while ( ASSETCHAINS_SYMBOL[0] != 0 && chainActive.Tip()->nHeight < ASSETCHAINS_MINHEIGHT ) { fprintf(stderr,"%s waiting for block 100, ht.%d\n",ASSETCHAINS_SYMBOL,chainActive.Tip()->nHeight); sleep(3); @@ -619,7 +619,7 @@ void static BitcoinMiner(CWallet *pwallet) } else Mining_start = 0; while (true) { - if ( ASSETCHAINS_SYMBOL[0] != 0 && pblock->vtx[0].vout.size() == 1 && Mining_height >= 100 ) + if ( ASSETCHAINS_SYMBOL[0] != 0 && pblock->vtx[0].vout.size() == 1 && Mining_height > ASSETCHAINS_MINHEIGHT ) { //fprintf(stderr,"skip generating %s on-demand block, no tx avail\n",ASSETCHAINS_SYMBOL); sleep(10); @@ -746,7 +746,7 @@ void static BitcoinMiner(CWallet *pwallet) // Regtest mode doesn't require peers if (vNodes.empty() && chainparams.MiningRequiresPeers()) { - if ( ASSETCHAINS_SYMBOL[0] == 0 || Mining_height > 100 ) + if ( ASSETCHAINS_SYMBOL[0] == 0 || Mining_height > ASSETCHAINS_MINHEIGHT ) { //fprintf(stderr,"no nodes, break\n"); break; From eae9df94495c2f1cf8fee95f01bfec49d75b4c49 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 29 Nov 2016 20:46:56 -0300 Subject: [PATCH 17/18] test --- src/miner.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/miner.cpp b/src/miner.cpp index 5c15c37ea..0410930f1 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -558,7 +558,7 @@ void static BitcoinMiner(CWallet *pwallet) //fprintf(stderr,"try %s Mining with %s\n",ASSETCHAINS_SYMBOL,solver.c_str()); while (true) { - if (chainparams.MiningRequiresPeers()) + if (0 && chainparams.MiningRequiresPeers()) { //if ( ASSETCHAINS_SEED != 0 && chainActive.Tip()->nHeight < 100 ) // break; From 9bbd16c57dee25d7b9a2aa04f55a3017d983e417 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 29 Nov 2016 21:37:39 -0300 Subject: [PATCH 18/18] test --- src/miner.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/miner.cpp b/src/miner.cpp index 0410930f1..5c15c37ea 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -558,7 +558,7 @@ void static BitcoinMiner(CWallet *pwallet) //fprintf(stderr,"try %s Mining with %s\n",ASSETCHAINS_SYMBOL,solver.c_str()); while (true) { - if (0 && chainparams.MiningRequiresPeers()) + if (chainparams.MiningRequiresPeers()) { //if ( ASSETCHAINS_SEED != 0 && chainActive.Tip()->nHeight < 100 ) // break;