From 9557a5930137cb559b52a57d04f8ac8770862ed5 Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 13 Apr 2018 19:14:45 +0300 Subject: [PATCH] Test --- src/pow.cpp | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/src/pow.cpp b/src/pow.cpp index dba8c1403..15c5c8732 100644 --- a/src/pow.cpp +++ b/src/pow.cpp @@ -146,7 +146,7 @@ bool CheckProofOfWork(int32_t height,uint8_t *pubkey33,uint256 hash, unsigned in } if ( height > 34000 && ASSETCHAINS_SYMBOL[0] == 0 ) // 0 -> non-special notary { - if ( KOMODO_LOADINGBLOCKS == 0 ) + if ( KOMODO_LOADINGBLOCKS != 0 ) return(true); if ( (pindex= komodo_chainactive(height)) != 0 ) { @@ -191,28 +191,17 @@ bool CheckProofOfWork(int32_t height,uint8_t *pubkey33,uint256 hash, unsigned in // Check proof of work matches claimed amount if ( UintToArith256(hash) > bnTarget ) { - for (i=31; i>=0; i--) - printf("%02x",((uint8_t *)&hash)[i]); - printf(" hash vs "); - for (i=31; i>=0; i--) - printf("%02x",((uint8_t *)&bnTarget)[i]); - printf(" ht.%d special.%d notaryid.%d ht.%d mod.%d error\n",height,special,notaryid,height,(height % 35)); if ( pindex != 0 ) { pindex->didinit = 0; komodo_pindex_init(pindex,height); } - for (i=0; i<33; i++) - printf("%02x",pubkey33[i]); - printf(" <- pubkey\n"); - for (i=0; i<66; i++) - printf("%d ",mids[i]); - printf(" minerids from ht.%d pindex.%p\n",height,pindex); return false; } return true; } + arith_uint256 GetBlockProof(const CBlockIndex& block) { arith_uint256 bnTarget;