This commit is contained in:
jl777
2019-03-28 03:18:06 -11:00
parent 21a8da8667
commit ca1ee9a8c1
3 changed files with 5 additions and 7 deletions

View File

@@ -1554,9 +1554,7 @@ CScript komodo_mineropret(int32_t nHeight)
{ {
CScript opret; CScript opret;
if ( Mineropret.size() != 0 ) if ( Mineropret.size() != 0 )
{ return(opret << OP_RETURN << Mineropret);
opret << OP_RETURN << Mineropret);
}
return(opret); return(opret);
} }
@@ -1569,7 +1567,7 @@ int32_t komodo_opretvalidate(int32_t nHeight,CScript scriptPubKey)
if ( vopret.size() == sizeof(pricebits) ) if ( vopret.size() == sizeof(pricebits) )
{ {
memcpy(pricebits,&Mineropret[0],sizeof(pricebits)); memcpy(pricebits,&Mineropret[0],sizeof(pricebits));
fprintf(stderr,"ht.%d: t%u %.4f USD, %.4f GBP, %.4f EUR\n",nHeight,pricebits[0],(double)pricebits[1]/10000,(double)pricebits[2]/10000,(double)pricebits[3]/10000) fprintf(stderr,"ht.%d: t%u %.4f USD, %.4f GBP, %.4f EUR\n",nHeight,pricebits[0],(double)pricebits[1]/10000,(double)pricebits[2]/10000,(double)pricebits[3]/10000);
return(0); return(0);
} }
return(-1); return(-1);

View File

@@ -1814,8 +1814,8 @@ void komodo_args(char *argv0)
hexstr = GetArg("-ac_mineropret",""); hexstr = GetArg("-ac_mineropret","");
if ( hexstr.size() != 0 ) if ( hexstr.size() != 0 )
{ {
Mineropret.resize(hexstr.size()/2) Mineropret.resize(hexstr.size()/2);
decode_hex(&Mineropret,hexstr.size()/2,(char *)hexstr.c_str()); decode_hex(&Mineropret[0],hexstr.size()/2,(char *)hexstr.c_str());
for (i=0; i<Mineropret.size(); i++) for (i=0; i<Mineropret.size(); i++)
fprintf(stderr,"%02x",Mineropret[i]); fprintf(stderr,"%02x",Mineropret[i]);
fprintf(stderr," Mineropret\n"); fprintf(stderr," Mineropret\n");

View File

@@ -1018,7 +1018,7 @@ bool ContextualCheckCoinbaseTransaction(const CTransaction& tx, const int nHeigh
{ {
} }
else if ( ASSETCHAINS_MINEROPRET != 0 ) else if ( ASSETCHAINS_CBOPRET != 0 )
{ {
if ( komodo_opretvalidate(nHeight,tx.vout[1].scriptPubKey) < 0 ) if ( komodo_opretvalidate(nHeight,tx.vout[1].scriptPubKey) < 0 )
return(false); return(false);