This commit is contained in:
jl777
2019-01-12 01:45:23 -11:00
parent e656efa89c
commit 9a46e8a577
2 changed files with 19 additions and 28 deletions

View File

@@ -112,33 +112,20 @@ uint8_t DecodeMaramaraCoinbaseOpRet(const CScript &scriptPubKey,CPubKey &pk,int3
return(0);
}
CScript Marmara_scriptPubKey(int32_t height,CScript scriptPubKey)
CScript Marmara_scriptPubKey(int32_t height,CPubKey pk)
{
CTxOut ccvout; uint8_t *ptr; CPubKey pk;
if ( height > 0 && (height & 1) == 0 && scriptPubKey.size() == 35 )
{
ptr = (uint8_t *)scriptPubKey.data();
if ( ptr[0] == 33 && ptr[34] == OP_CHECKSIG )
pk = buf2pk(ptr+1);
CTxOut ccvout;
if ( height > 0 && (height & 1) == 0 && pk.size() == 33 )
ccvout = MakeCC1vout(EVAL_MARMARA,0,pk);
return(ccvout.scriptPubKey);
}
return(scriptPubKey);
return(ccvout.scriptPubKey);
}
CScript MarmaraCoinbaseOpret(int32_t height,CScript scriptPubKey)
CScript MarmaraCoinbaseOpret(int32_t height,CPubKey pk)
{
uint8_t *ptr; CPubKey pk;
if ( height > 0 && (height & 1) == 0 && scriptPubKey.size() == 35 )
{
ptr = (uint8_t *)scriptPubKey.data();
if ( ptr[0] == 33 && ptr[34] == OP_CHECKSIG )
{
pk = buf2pk(ptr+1);
return(EncodeMarmaraCoinbaseOpRet(pk,height));
}
}
return(scriptPubKey);
if ( height > 0 && (height & 1) == 0 && pk.size() == 33 )
return(EncodeMarmaraCoinbaseOpRet(pk,height));
return(CScript());
}
int32_t MarmaraValidateCoinbase(int32_t height,CTransaction tx)