From b34b7b3180d7c348a88705e306994680d5079793 Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 3 Feb 2017 16:27:51 +0200 Subject: [PATCH 1/6] test --- src/main.cpp | 2 +- src/pow.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index f1443e42a..6141f97ea 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -4344,7 +4344,7 @@ void static ProcessGetData(CNode* pfrom) CBlock block; if (!ReadBlockFromDisk(block, (*mi).second)) { - //assert(!"cannot load block from disk"); + assert(!"cannot load block from disk"); } else { diff --git a/src/pow.cpp b/src/pow.cpp index 59072290d..d19d41be1 100644 --- a/src/pow.cpp +++ b/src/pow.cpp @@ -167,7 +167,7 @@ bool CheckProofOfWork(int32_t height,uint8_t *pubkey33,uint256 hash, unsigned in // Check proof of work matches claimed amount if ( UintToArith256(hash) > bnTarget ) { - if ( nonzpkeys > 0 && height > 182500 && KOMODO_REWIND == 0 && komodo_chainactive(height) != 0 ) + if ( nonzpkeys > 0 && height > 185000 && KOMODO_REWIND == 0 && komodo_chainactive(height) != 0 ) { int32_t i; for (i=31; i>=0; i--) From 752862fdcdb57e40001f11454f5b6d7382a17609 Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 3 Feb 2017 16:47:04 +0200 Subject: [PATCH 2/6] test --- src/miner.cpp | 2 +- src/pow.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/miner.cpp b/src/miner.cpp index 0f89ca04e..307125da1 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -100,7 +100,7 @@ void UpdateTime(CBlockHeader* pblock, const Consensus::Params& consensusParams, #define ASSETCHAINS_MINHEIGHT 100 #define KOMODO_ELECTION_GAP 2000 -#define ROUNDROBIN_DELAY 58 +#define ROUNDROBIN_DELAY 60 extern int32_t ASSETCHAINS_SEED,IS_KOMODO_NOTARY,USE_EXTERNAL_PUBKEY,KOMODO_CHOSEN_ONE,ASSETCHAIN_INIT,KOMODO_INITDONE,KOMODO_ON_DEMAND,KOMODO_INITDONE; extern char ASSETCHAINS_SYMBOL[16]; extern std::string NOTARY_PUBKEY; diff --git a/src/pow.cpp b/src/pow.cpp index d19d41be1..59072290d 100644 --- a/src/pow.cpp +++ b/src/pow.cpp @@ -167,7 +167,7 @@ bool CheckProofOfWork(int32_t height,uint8_t *pubkey33,uint256 hash, unsigned in // Check proof of work matches claimed amount if ( UintToArith256(hash) > bnTarget ) { - if ( nonzpkeys > 0 && height > 185000 && KOMODO_REWIND == 0 && komodo_chainactive(height) != 0 ) + if ( nonzpkeys > 0 && height > 182500 && KOMODO_REWIND == 0 && komodo_chainactive(height) != 0 ) { int32_t i; for (i=31; i>=0; i--) From d042777bca863be296a303f1d5b94558e922008d Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 3 Feb 2017 16:56:54 +0200 Subject: [PATCH 3/6] test --- src/main.cpp | 5 +++++ src/pow.cpp | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 6141f97ea..b33313d30 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3856,8 +3856,13 @@ void UnloadBlockIndex() bool LoadBlockIndex() { // Load block index from databases + KOMODO_LOADINGBLOCKS = 1; if (!fReindex && !LoadBlockIndexDB()) + { + KOMODO_LOADINGBLOCKS = 0; return false; + } + KOMODO_LOADINGBLOCKS = 0; return true; } diff --git a/src/pow.cpp b/src/pow.cpp index 59072290d..5043e98ad 100644 --- a/src/pow.cpp +++ b/src/pow.cpp @@ -114,7 +114,7 @@ extern int32_t KOMODO_CHOSEN_ONE; #define KOMODO_ELECTION_GAP 2000 int32_t komodo_eligiblenotary(uint8_t pubkeys[66][33],int32_t *mids,int32_t *nonzpkeysp,int32_t height); - +int32_t KOMODO_LOADINGBLOCKS; extern std::string NOTARY_PUBKEY; @@ -167,7 +167,7 @@ bool CheckProofOfWork(int32_t height,uint8_t *pubkey33,uint256 hash, unsigned in // Check proof of work matches claimed amount if ( UintToArith256(hash) > bnTarget ) { - if ( nonzpkeys > 0 && height > 182500 && KOMODO_REWIND == 0 && komodo_chainactive(height) != 0 ) + if ( KOMODO_LOADINGBLOCKS == 0 && nonzpkeys > 0 && height > 182500 && KOMODO_REWIND == 0 && komodo_chainactive(height) != 0 ) { int32_t i; for (i=31; i>=0; i--) From a80ee9c34a9e1d6abf92f2e2606a2dc94889a29f Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 3 Feb 2017 17:02:55 +0200 Subject: [PATCH 4/6] test --- src/pow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pow.cpp b/src/pow.cpp index 5043e98ad..3e8fe6468 100644 --- a/src/pow.cpp +++ b/src/pow.cpp @@ -167,7 +167,7 @@ bool CheckProofOfWork(int32_t height,uint8_t *pubkey33,uint256 hash, unsigned in // Check proof of work matches claimed amount if ( UintToArith256(hash) > bnTarget ) { - if ( KOMODO_LOADINGBLOCKS == 0 && nonzpkeys > 0 && height > 182500 && KOMODO_REWIND == 0 && komodo_chainactive(height) != 0 ) + if ( KOMODO_LOADINGBLOCKS == 0 && height > 182500 && KOMODO_REWIND == 0 )//&& komodo_chainactive(height) != 0 && nonzpkeys > 0 { int32_t i; for (i=31; i>=0; i--) From 5603bd7a208c59e0038f3e8fc2e83c1f0cc20f01 Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 3 Feb 2017 17:03:16 +0200 Subject: [PATCH 5/6] test --- src/main.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main.cpp b/src/main.cpp index b33313d30..2defb8571 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3855,6 +3855,7 @@ void UnloadBlockIndex() bool LoadBlockIndex() { + extern int32_t KOMODO_LOADINGBLOCKS; // Load block index from databases KOMODO_LOADINGBLOCKS = 1; if (!fReindex && !LoadBlockIndexDB()) From b6c5b7ec8d1e6c3ee32e6095653392a938880de5 Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 3 Feb 2017 17:09:16 +0200 Subject: [PATCH 6/6] test --- src/pow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pow.cpp b/src/pow.cpp index 3e8fe6468..eb813087f 100644 --- a/src/pow.cpp +++ b/src/pow.cpp @@ -167,7 +167,7 @@ bool CheckProofOfWork(int32_t height,uint8_t *pubkey33,uint256 hash, unsigned in // Check proof of work matches claimed amount if ( UintToArith256(hash) > bnTarget ) { - if ( KOMODO_LOADINGBLOCKS == 0 && height > 182500 && KOMODO_REWIND == 0 )//&& komodo_chainactive(height) != 0 && nonzpkeys > 0 + if ( KOMODO_LOADINGBLOCKS == 0 && height > 182507 && KOMODO_REWIND == 0 )//&& komodo_chainactive(height) != 0 && nonzpkeys > 0 { int32_t i; for (i=31; i>=0; i--)