-ac_ccactivate

Allows a chain to “dynamically” update to CC enabled
This commit is contained in:
jl777
2018-08-22 08:17:20 -11:00
parent eb4cf14d40
commit 1c75341741
5 changed files with 13 additions and 5 deletions

View File

@@ -28,7 +28,7 @@
#include <univalue.h>
#include <exception>
extern int32_t KOMODO_CONNECTING;
extern int32_t KOMODO_CONNECTING,KOMODO_CCACTIVATE;
#define SMALLVAL 0.000000000000001
union _bits256 { uint8_t bytes[32]; uint16_t ushorts[16]; uint32_t uints[8]; uint64_t ulongs[4]; uint64_t txid; };

View File

@@ -256,9 +256,11 @@ CPubKey GetUnspendable(struct CCcontract_info *cp,uint8_t *unspendablepriv)
bool ProcessCC(struct CCcontract_info *cp,Eval* eval, std::vector<uint8_t> paramsNull,const CTransaction &ctx, unsigned int nIn)
{
CTransaction createTx; uint256 assetid,assetid2,hashBlock; uint8_t funcid; int32_t height,i,n,from_mempool = 0; int64_t amount; std::vector<uint8_t> origpubkey;
height = KOMODO_CONNECTING;
if ( KOMODO_CONNECTING < 0 ) // always comes back with > 0 for final confirmation
return(true);
height = KOMODO_CONNECTING;
if ( ASSETCHAINS_CC == 0 || height < KOMODO_CCACTIVATE )
return eval->Invalid("CC are disabled or not active yet");
if ( (KOMODO_CONNECTING & (1<<30)) != 0 )
{
from_mempool = 1;