From 1cb03d8e304d0e8356afbd686b591434cdb02ca5 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Tue, 10 Dec 2019 23:58:32 -0500 Subject: [PATCH] Compile fixes --- src/cc/oracles.cpp | 7 +++++++ src/komodo_bitcoind.h | 5 ----- src/komodo_defs.h | 2 +- src/miner.cpp | 2 +- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/cc/oracles.cpp b/src/cc/oracles.cpp index 067cba043..00aac5087 100644 --- a/src/cc/oracles.cpp +++ b/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) { diff --git a/src/komodo_bitcoind.h b/src/komodo_bitcoind.h index fdfaa0669..bcd2cf91a 100644 --- a/src/komodo_bitcoind.h +++ b/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; diff --git a/src/komodo_defs.h b/src/komodo_defs.h index 24d5557f0..dfd1cd62a 100644 --- a/src/komodo_defs.h +++ b/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) diff --git a/src/miner.cpp b/src/miner.cpp index b04ff285d..2ce5ca1a1 100644 --- a/src/miner.cpp +++ b/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() )