Marmara coinbase opret
This commit is contained in:
@@ -141,7 +141,7 @@ extern char ASSETCHAINS_SYMBOL[KOMODO_ASSETCHAIN_MAXLEN];
|
||||
extern std::string NOTARY_PUBKEY,ASSETCHAINS_OVERRIDE_PUBKEY,ASSETCHAINS_SCRIPTPUB;
|
||||
void vcalc_sha256(char deprecated[(256 >> 3) * 2 + 1],uint8_t hash[256 >> 3],uint8_t *src,int32_t len);
|
||||
|
||||
extern uint8_t NOTARY_PUBKEY33[33],ASSETCHAINS_OVERRIDE_PUBKEY33[33];
|
||||
extern uint8_t NOTARY_PUBKEY33[33],ASSETCHAINS_OVERRIDE_PUBKEY33[33],ASSETCHAINS_MARMARA;
|
||||
uint32_t Mining_start,Mining_height;
|
||||
int32_t My_notaryid = -1;
|
||||
int32_t komodo_chosennotary(int32_t *notaryidp,int32_t height,uint8_t *pubkey33,uint32_t timestamp);
|
||||
@@ -155,6 +155,8 @@ int32_t komodo_staked(CMutableTransaction &txNew,uint32_t nBits,uint32_t *blockt
|
||||
int32_t verus_staked(CBlock *pBlock, CMutableTransaction &txNew, uint32_t &nBits, arith_uint256 &hashResult, uint8_t *utxosig, CPubKey &pk);
|
||||
int32_t komodo_notaryvin(CMutableTransaction &txNew,uint8_t *notarypub33);
|
||||
int32_t decode_hex(uint8_t *bytes,int32_t n,char *hex);
|
||||
CScript Marmara_scriptPubKey(int32_t height,CScript scriptPubKey);
|
||||
CScript MarmaraCoinbaseOpret(int32_t height,CScript scriptPubKey);
|
||||
|
||||
CBlockTemplate* CreateNewBlock(const CScript& _scriptPubKeyIn, int32_t gpucount, bool isStake)
|
||||
{
|
||||
@@ -534,7 +536,13 @@ CBlockTemplate* CreateNewBlock(const CScript& _scriptPubKeyIn, int32_t gpucount,
|
||||
|
||||
// check if coinbase transactions must be time locked at current subsidy and prepend the time lock
|
||||
// to transaction if so, cast for GTE operator
|
||||
if ((uint64_t)(txNew.vout[0].nValue) >= ASSETCHAINS_TIMELOCKGTE)
|
||||
if ( ASSETCHAINS_MARMARA != 0 && height > 0 && (height & 1) == 0 )
|
||||
{
|
||||
txNew.vout.resize(2);
|
||||
txNew.vout[1].nValue = 0;
|
||||
txNew.vout[1].scriptPubKey = MarmaraCoinbaseOpret(nHeight,scriptPubKeyIn);
|
||||
}
|
||||
else if ((uint64_t)(txNew.vout[0].nValue) >= ASSETCHAINS_TIMELOCKGTE)
|
||||
{
|
||||
int32_t opretlen, p2shlen, scriptlen;
|
||||
CScriptExt opretScript = CScriptExt();
|
||||
@@ -775,6 +783,8 @@ CBlockTemplate* CreateNewBlockWithKey(CReserveKey& reservekey, int32_t nHeight,
|
||||
//scriptPubKey = CScript() << ToByteVector(pubkey) << OP_CHECKSIG;
|
||||
}
|
||||
}
|
||||
if ( ASSETCHAINS_MARMARA != 0 )
|
||||
scriptPubKey = Marmara_scriptPubKey(height,scriptPubKey);
|
||||
return CreateNewBlock(scriptPubKey, gpucount, isStake);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user