Use pk
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user