From f08c58656c0460a850d34e02ca58b29d5ffddf45 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 13 Mar 2017 08:49:52 +0200 Subject: [PATCH 1/6] Test --- src/miner.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/miner.cpp b/src/miner.cpp index 0fe7c46f4b..328cea92db 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -605,7 +605,7 @@ void static BitcoinMiner(CWallet *pwallet) Mining_height = pindexPrev->nHeight+1; Mining_start = (uint32_t)time(NULL); } - if ( ASSETCHAINS_SYMBOL[0] != 0 ) + //if ( ASSETCHAINS_SYMBOL[0] != 0 ) fprintf(stderr,"%s create new block ht.%d\n",ASSETCHAINS_SYMBOL,Mining_height); CBlockTemplate *ptr = CreateNewBlockWithKey(reservekey); if ( ptr == 0 ) From 0d141325cd7aef33a05c9c7766151c2266c59ef3 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 13 Mar 2017 08:59:00 +0200 Subject: [PATCH 2/6] Test --- src/miner.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/miner.cpp b/src/miner.cpp index 328cea92db..19651cbad4 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -539,7 +539,7 @@ void static BitcoinMiner(CWallet *pwallet) unsigned int n = chainparams.EquihashN(); unsigned int k = chainparams.EquihashK(); int32_t notaryid = -1; - while ( ASSETCHAIN_INIT == 0 || KOMODO_INITDONE == 0 ) + while ( chainActive.Tip()->nHeight != 235300 && (ASSETCHAIN_INIT == 0 || KOMODO_INITDONE == 0) ) { sleep(1); if ( komodo_baseid(ASSETCHAINS_SYMBOL) < 0 ) @@ -553,8 +553,8 @@ void static BitcoinMiner(CWallet *pwallet) //else solver = "default"; assert(solver == "tromp" || solver == "default"); LogPrint("pow", "Using Equihash solver \"%s\" with n = %u, k = %u\n", solver, n, k); - if ( ASSETCHAINS_SYMBOL[0] != 0 ) - fprintf(stderr,"Mining with %s\n",solver.c_str()); + //if ( ASSETCHAINS_SYMBOL[0] != 0 ) + fprintf(stderr,"notaryid.%d Mining with %s\n",notaryid,solver.c_str()); std::mutex m_cs; bool cancelSolver = false; boost::signals2::connection c = uiInterface.NotifyBlockTip.connect( From 835fc28e8cbce7a9ec7acefc59f0974be845f7ce Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 13 Mar 2017 09:02:34 +0200 Subject: [PATCH 3/6] Test --- src/miner.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/miner.cpp b/src/miner.cpp index 19651cbad4..ac29b87740 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -123,7 +123,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 >= ASSETCHAINS_MINHEIGHT ) + if ( chainActive.Tip()->nHeight != 235300 && ASSETCHAINS_SYMBOL[0] != 0 && chainActive.Tip()->nHeight >= ASSETCHAINS_MINHEIGHT ) { isrealtime = komodo_isrealtime(&kmdheight); deposits = komodo_paxtotal(); From 0e61a1fc93225797b8e201338f203d7d80807c17 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 13 Mar 2017 09:07:32 +0200 Subject: [PATCH 4/6] Test --- src/miner.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/miner.cpp b/src/miner.cpp index ac29b87740..406a0aabb0 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -569,7 +569,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 (chainActive.Tip()->nHeight != 235300 && chainparams.MiningRequiresPeers()) { //if ( ASSETCHAINS_SEED != 0 && chainActive.Tip()->nHeight < 100 ) // break; From 0fd42ed43cf46d1075aa05b54f0b7abaf9a48595 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 13 Mar 2017 09:14:10 +0200 Subject: [PATCH 5/6] Test --- src/miner.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/miner.cpp b/src/miner.cpp index 406a0aabb0..ac210aaf48 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -553,7 +553,7 @@ void static BitcoinMiner(CWallet *pwallet) //else solver = "default"; assert(solver == "tromp" || solver == "default"); LogPrint("pow", "Using Equihash solver \"%s\" with n = %u, k = %u\n", solver, n, k); - //if ( ASSETCHAINS_SYMBOL[0] != 0 ) + if ( ASSETCHAINS_SYMBOL[0] != 0 ) fprintf(stderr,"notaryid.%d Mining with %s\n",notaryid,solver.c_str()); std::mutex m_cs; bool cancelSolver = false; @@ -605,7 +605,7 @@ void static BitcoinMiner(CWallet *pwallet) Mining_height = pindexPrev->nHeight+1; Mining_start = (uint32_t)time(NULL); } - //if ( ASSETCHAINS_SYMBOL[0] != 0 ) + if ( ASSETCHAINS_SYMBOL[0] != 0 ) fprintf(stderr,"%s create new block ht.%d\n",ASSETCHAINS_SYMBOL,Mining_height); CBlockTemplate *ptr = CreateNewBlockWithKey(reservekey); if ( ptr == 0 ) From 4b6162f029583506becd5cc85a5e8d4831e67d44 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 13 Mar 2017 09:15:11 +0200 Subject: [PATCH 6/6] Test --- src/miner.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/miner.cpp b/src/miner.cpp index ac210aaf48..c5bffbddf4 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -123,7 +123,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn) if(!pblocktemplate.get()) return NULL; CBlock *pblock = &pblocktemplate->block; // pointer for convenience - if ( chainActive.Tip()->nHeight != 235300 && ASSETCHAINS_SYMBOL[0] != 0 && chainActive.Tip()->nHeight >= ASSETCHAINS_MINHEIGHT ) + if ( ASSETCHAINS_SYMBOL[0] != 0 && chainActive.Tip()->nHeight >= ASSETCHAINS_MINHEIGHT ) { isrealtime = komodo_isrealtime(&kmdheight); deposits = komodo_paxtotal();