Browse Source

Compile fixes

sietch
Duke Leto 5 years ago
parent
commit
1cb03d8e30
  1. 7
      src/cc/oracles.cpp
  2. 5
      src/komodo_bitcoind.h
  3. 2
      src/komodo_defs.h
  4. 2
      src/miner.cpp

7
src/cc/oracles.cpp

@ -96,6 +96,13 @@ extern int32_t komodo_get_current_height();
#define PUBKEY_SPOOFING_FIX_ACTIVATION 1563148800
#define CC_MARKER_VALUE 10000
int32_t GetLatestTimestamp(int32_t height)
{
if ( KOMODO_NSPV_SUPERLITE ) return (NSPV_blocktime(height));
return(komodo_heightstamp(height));
}
// start of consensus code
CScript EncodeOraclesCreateOpRet(uint8_t funcid,std::string name,std::string description,std::string format)
{

5
src/komodo_bitcoind.h

@ -695,11 +695,6 @@ int32_t komodo_WhoStaked(CBlock *pblock, CTxDestination &addressout)
return(0);
}
int32_t komodo_hasOpRet(int32_t height, uint32_t timestamp)
{
return((ASSETCHAINS_MARMARA!=0 || komodo_newStakerActive(height, timestamp) == 1));
}
bool komodo_checkopret(CBlock *pblock, CScript &merkleroot)
{
merkleroot = pblock->vtx.back().vout.back().scriptPubKey;

2
src/komodo_defs.h

@ -431,7 +431,7 @@ int32_t komodo_blockheight(uint256 hash);
bool komodo_txnotarizedconfirmed(uint256 txid);
int32_t komodo_blockload(CBlock& block, CBlockIndex *pindex);
uint32_t komodo_chainactive_timestamp();
uint32_t GetLatestTimestamp(int32_t height);
//uint32_t GetLatestTimestamp(int32_t height);
#ifndef KOMODO_NSPV_FULLNODE
#define KOMODO_NSPV_FULLNODE (KOMODO_NSPV <= 0)

2
src/miner.cpp

@ -591,7 +591,7 @@ CBlockTemplate* CreateNewBlock(CPubKey _pk,const CScript& _scriptPubKeyIn, int32
else
{
blocktime = GetAdjustedTime();
siglen = komodo_staked(txStaked, pblock->nBits, &blocktime, &txtime, &utxotxid, &utxovout, &utxovalue, utxosig);
//siglen = komodo_staked(txStaked, pblock->nBits, &blocktime, &txtime, &utxotxid, &utxovout, &utxovalue, utxosig);
// if you skip this check it will create a block too far into the future and not pass ProcessBlock or AcceptBlock.
// This has been moved from the mining loop to save CPU, and to also make ac_staked work
while ( blocktime-57 > GetAdjustedTime() )

Loading…
Cancel
Save