Browse Source

test

pull/4/head
jl777 8 years ago
parent
commit
4940066cd1
  1. 8
      src/miner.cpp
  2. 2
      src/pow.cpp

8
src/miner.cpp

@ -571,10 +571,13 @@ void static BitcoinMiner(CWallet *pwallet)
//
// Create new block
//
Mining_start = (uint32_t)time(NULL);
unsigned int nTransactionsUpdatedLast = mempool.GetTransactionsUpdated();
CBlockIndex* pindexPrev = chainActive.Tip();
Mining_height = pindexPrev->nHeight+1;
if ( Mining_height != pindexPrev->nHeight+1 )
{
Mining_height = pindexPrev->nHeight+1;
Mining_start = (uint32_t)time(NULL);
}
if ( ASSETCHAINS_SYMBOL[0] != 0 )
fprintf(stderr,"%s create new block ht.%d\n",ASSETCHAINS_SYMBOL,Mining_height);
@ -596,7 +599,6 @@ void static BitcoinMiner(CWallet *pwallet)
if ( ASSETCHAINS_SYMBOL[0] == 0 && komodo_is_special(pindexPrev->nHeight+1,NOTARY_PUBKEY33) > 0 )
{
hashTarget = arith_uint256().SetCompact(KOMODO_MINDIFF_NBITS);
Mining_start = (uint32_t)time(NULL);
//fprintf(stderr,"I am the chosen one for %s ht.%d\n",ASSETCHAINS_SYMBOL,pindexPrev->nHeight+1);
} else Mining_start = 0;
while (true)

2
src/pow.cpp

@ -131,7 +131,7 @@ bool CheckProofOfWork(int32_t height,uint8_t *pubkey33,uint256 hash, unsigned in
{
if ( notaryid >= 0 )
{
if ( height < 70000 || komodo_is_special(height,pubkey33) > 0 )
if ( height < 70000 || special != 0 || komodo_is_special(height,pubkey33) > 0 )
{
bnTarget.SetCompact(KOMODO_MINDIFF_NBITS,&fNegative,&fOverflow);
flag = 1;

Loading…
Cancel
Save