|
|
@ -92,7 +92,7 @@ |
|
|
|
vout.n-1: opreturn with oracletxid, prevbatontxid and data in proper format |
|
|
|
|
|
|
|
*/ |
|
|
|
extern int32_t komodo_currentheight(); |
|
|
|
extern int32_t komodo_get_current_height(); |
|
|
|
#define PUBKEY_SPOOFING_FIX_ACTIVATION 1563148800 |
|
|
|
#define CC_MARKER_VALUE 10000 |
|
|
|
|
|
|
@ -896,7 +896,7 @@ std::string OracleFund(int64_t txfee,uint256 oracletxid) |
|
|
|
CMutableTransaction mtx = CreateNewContextualCMutableTransaction(Params().GetConsensus(), komodo_nextheight()); |
|
|
|
CPubKey mypk,oraclespk; struct CCcontract_info *cp,C; |
|
|
|
|
|
|
|
if (GetLatestTimestamp(komodo_currentheight())<PUBKEY_SPOOFING_FIX_ACTIVATION) |
|
|
|
if (GetLatestTimestamp(komodo_get_current_height())<PUBKEY_SPOOFING_FIX_ACTIVATION) |
|
|
|
{ |
|
|
|
CCerror = strprintf("oraclesfund not active yet, activation scheduled for July 15th"); |
|
|
|
fprintf(stderr,"%s\n", CCerror.c_str() ); |
|
|
@ -936,7 +936,7 @@ std::string OracleRegister(int64_t txfee,uint256 oracletxid,int64_t datafee) |
|
|
|
markerpubkey = CCtxidaddr(markeraddr,oracletxid); |
|
|
|
if (AddNormalinputs(mtx,mypk,3*txfee,4)) |
|
|
|
{ |
|
|
|
if (GetLatestTimestamp(komodo_currentheight())>PUBKEY_SPOOFING_FIX_ACTIVATION && AddMyOraclesFunds(cp,mtx,mypk,oracletxid)!=CC_MARKER_VALUE) |
|
|
|
if (GetLatestTimestamp(komodo_get_current_height())>PUBKEY_SPOOFING_FIX_ACTIVATION && AddMyOraclesFunds(cp,mtx,mypk,oracletxid)!=CC_MARKER_VALUE) |
|
|
|
{ |
|
|
|
CCerror = strprintf("error adding inputs from your Oracles CC address, please fund it first with oraclesfund rpc!"); |
|
|
|
fprintf(stderr,"%s\n", CCerror.c_str() ); |
|
|
@ -944,7 +944,7 @@ std::string OracleRegister(int64_t txfee,uint256 oracletxid,int64_t datafee) |
|
|
|
} |
|
|
|
mtx.vout.push_back(CTxOut(txfee,CScript() << ParseHex(HexStr(markerpubkey)) << OP_CHECKSIG)); |
|
|
|
mtx.vout.push_back(MakeCC1vout(cp->evalcode,txfee,batonpk)); |
|
|
|
if (GetLatestTimestamp(komodo_currentheight())>PUBKEY_SPOOFING_FIX_ACTIVATION) mtx.vout.push_back(CTxOut(txfee,CScript() << ParseHex(HexStr(mypk)) << OP_CHECKSIG)); |
|
|
|
if (GetLatestTimestamp(komodo_get_current_height())>PUBKEY_SPOOFING_FIX_ACTIVATION) mtx.vout.push_back(CTxOut(txfee,CScript() << ParseHex(HexStr(mypk)) << OP_CHECKSIG)); |
|
|
|
return(FinalizeCCTx(0,cp,mtx,mypk,txfee,EncodeOraclesOpRet('R',oracletxid,mypk,datafee))); |
|
|
|
} |
|
|
|
CCerror = strprintf("error adding normal inputs"); |
|
|
|