From fd002038624e9211f02db99a235e2837b5bb6f72 Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 13 Apr 2018 21:00:27 +0300 Subject: [PATCH] Test --- src/pow.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/pow.cpp b/src/pow.cpp index 5958b47dd..ec297a559 100644 --- a/src/pow.cpp +++ b/src/pow.cpp @@ -135,8 +135,9 @@ extern std::string NOTARY_PUBKEY; bool CheckProofOfWork(int32_t height,uint8_t *pubkey33,uint256 hash, unsigned int nBits, const Consensus::Params& params) { extern int32_t KOMODO_REWIND; - bool fNegative,fOverflow; int32_t i,nonzpkeys=0,nonz=0,special=0,special2=0,notaryid=-1,flag = 0, mids[66]; uint32_t timestamp = 0; CBlockIndex *pindex=0; + bool fNegative,fOverflow; uint8_t origpubkey33[33]; int32_t i,nonzpkeys=0,nonz=0,special=0,special2=0,notaryid=-1,flag = 0, mids[66]; uint32_t timestamp = 0; CBlockIndex *pindex=0; arith_uint256 bnTarget; uint8_t pubkeys[66][33]; + memcpy(origpubkey33,pubkey33,33); timestamp = komodo_chainactive_timestamp(); bnTarget.SetCompact(nBits, &fNegative, &fOverflow); if ( height == 0 ) @@ -208,6 +209,9 @@ bool CheckProofOfWork(int32_t height,uint8_t *pubkey33,uint256 hash, unsigned in for (i=0; i<33; i++) printf("%02x",pubkey33[i]); printf(" <- pubkey\n"); + for (i=0; i<33; i++) + printf("%02x",origpubkey33[i]); + printf(" <- origpubkey\n"); for (i=0; i<66; i++) printf("%d ",mids[i]); printf(" minerids from ht.%d pindex.%p\n",height,pindex);