diff --git a/src/komodo_bitcoind.h b/src/komodo_bitcoind.h index d6a3e937a..4ed66f7b1 100644 --- a/src/komodo_bitcoind.h +++ b/src/komodo_bitcoind.h @@ -1330,7 +1330,7 @@ bool verusCheckPOSBlock(int32_t slowflag, CBlock *pblock, int32_t height) strcpy(voutaddr, CBitcoinAddress(voutaddress).ToString().c_str()); strcpy(destaddr, CBitcoinAddress(destaddress).ToString().c_str()); strcpy(cbaddr, CBitcoinAddress(cbaddress).ToString().c_str()); - if ( !strcmp(destaddr,voutaddr) && (strcmp(destaddr,cb) || (height < 6480)) ) + if ( !strcmp(destaddr,voutaddr) && (strcmp(destaddr,cbaddr) || (height < 6480)) ) { isPOS = true; } diff --git a/src/miner.cpp b/src/miner.cpp index 72c184e57..2c2d414c8 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -130,8 +130,9 @@ int32_t komodo_staked(CPubKey &pubkey, CMutableTransaction &txNew,uint32_t nBits int32_t verus_staked(CPubKey &pubkey, CMutableTransaction &txNew, uint32_t &nBits, arith_uint256 &hashResult, uint8_t *utxosig); int32_t komodo_notaryvin(CMutableTransaction &txNew,uint8_t *notarypub33); -CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn, bool isStake) +CBlockTemplate* CreateNewBlock(const CScript& _scriptPubKeyIn, bool isStake) { + CScript scriptPubKeyIn(_scriptPubKeyIn); uint64_t deposits; int32_t isrealtime,kmdheight; uint32_t blocktime; const CChainParams& chainparams = Params(); // Create new block std::unique_ptr pblocktemplate(new CBlockTemplate());