diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index a2c726007..645ef6145 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -797,6 +797,7 @@ int32_t komodo_check_deposit(int32_t height,const CBlock& block,uint32_t prevtim if ( eligible == 0 || eligible > block.nTime ) { fprintf(stderr,"eligible.%u vs blocktime.%u, lag.%d\n",eligible,(uint32_t)block.nTime,(int32_t)(eligible - block.nTime)); + return(-1); } } if ( ASSETCHAINS_OVERRIDE_PUBKEY33[0] != 0 && ASSETCHAINS_COMMISSION != 0 && block.vtx[0].vout.size() > 1 ) diff --git a/src/pow.cpp b/src/pow.cpp index 63806033d..23f1cf67b 100644 --- a/src/pow.cpp +++ b/src/pow.cpp @@ -122,6 +122,7 @@ int32_t komodo_currentheight(); CBlockIndex *komodo_chainactive(int32_t height); void komodo_index2pubkey33(uint8_t *pubkey33,CBlockIndex *pindex,int32_t height); extern int32_t KOMODO_CHOSEN_ONE; +extern uint64_t ASSETCHAINS_STAKED; extern char ASSETCHAINS_SYMBOL[]; #define KOMODO_ELECTION_GAP 2000 @@ -141,7 +142,9 @@ bool CheckProofOfWork(int32_t height,uint8_t *pubkey33,uint256 hash, unsigned in height = komodo_currentheight() + 1; special = komodo_chosennotary(¬aryid,height,pubkey33,timestamp); flag = komodo_eligiblenotary(pubkeys,mids,&nonzpkeys,height); - if ( height > 34000 && ASSETCHAINS_SYMBOL[0] == 0 ) // 0 -> non-special notary + if ( ASSETCHAINS_STAKED != 0 ) + bnTarget.SetCompact(KOMODO_MINDIFF_NBITS,&fNegative,&fOverflow); + else if ( height > 34000 && ASSETCHAINS_SYMBOL[0] == 0 ) // 0 -> non-special notary { for (i=0; i<33; i++) {