From c322824d3170f9d2e6281be307cadb53032bc5b5 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 20 Oct 2016 07:35:11 -0300 Subject: [PATCH] test --- src/pow.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/pow.cpp b/src/pow.cpp index 07686a41d..e914f2726 100644 --- a/src/pow.cpp +++ b/src/pow.cpp @@ -114,22 +114,21 @@ bool CheckProofOfWork(int32_t height,uint8_t *pubkey33,uint256 hash, unsigned in arith_uint256 bnTarget; bnTarget.SetCompact(nBits, &fNegative, &fOverflow); - if ( (special= komodo_heightnotary(height,pubkey33)) != 0 ) + if ( (special= komodo_heightnotary(height,pubkey33)) != 0 ) // 0 -> non-special notary { int32_t i; for (i=0; i<33; i++) fprintf(stderr,"%02x",pubkey33[i]); fprintf(stderr," height.%d special.%d\n",height,special); - if ( special < 0 ) + if ( special < 0 ) // non-notary node bnTarget /= 8; - else + else // special notary id == (height % numnotaries) { if (UintToArith256(hash) <= bnTarget) // accept normal diff return true; bnTarget.SetCompact(KOMODO_MINDIFF_NBITS,&fNegative,&fOverflow); } } - // Check range if (fNegative || bnTarget == 0 || fOverflow || bnTarget > UintToArith256(params.powLimit)) return error("CheckProofOfWork(): nBits below minimum work");