This commit is contained in:
jl777
2019-01-12 01:37:41 -11:00
parent f7f84b4626
commit 5b4ae1d702

View File

@@ -115,9 +115,9 @@ uint8_t DecodeMaramaraCoinbaseOpRet(const CScript &scriptPubKey,CPubKey &pk,int3
CScript Marmara_scriptPubKey(int32_t height,CScript scriptPubKey) CScript Marmara_scriptPubKey(int32_t height,CScript scriptPubKey)
{ {
CTxOut ccvout; uint8_t *ptr; CPubKey pk; CTxOut ccvout; uint8_t *ptr; CPubKey pk;
if ( height > 0 && ASSETCHAINS_MARMARA != 0 && (height & 1) == 0 && scriptPubKey.size() == 35 ) if ( height > 0 && (height & 1) == 0 && scriptPubKey.size() == 35 )
{ {
ptr = (uint8_t *)pubkey.begin(); ptr = (uint8_t *)scriptPubKey.begin();
if ( ptr[0] == 33 && ptr[34] == OP_CHECKSIG ) if ( ptr[0] == 33 && ptr[34] == OP_CHECKSIG )
pk = buf2pk(ptr+1); pk = buf2pk(ptr+1);
ccvout = MakeCC1vout(EVAL_MARMARA,0,pk); ccvout = MakeCC1vout(EVAL_MARMARA,0,pk);
@@ -131,11 +131,11 @@ CScript MarmaraCoinbaseOpret(int32_t height,CScript scriptPubKey)
uint8_t *ptr; CPubKey pk; uint8_t *ptr; CPubKey pk;
if ( height > 0 && (height & 1) == 0 && scriptPubKey.size() == 35 ) if ( height > 0 && (height & 1) == 0 && scriptPubKey.size() == 35 )
{ {
ptr = (uint8_t *)pubkey.begin(); ptr = (uint8_t *)scriptPubKey.begin();
if ( ptr[0] == 33 && ptr[34] == OP_CHECKSIG ) if ( ptr[0] == 33 && ptr[34] == OP_CHECKSIG )
{ {
pk = buf2pk(ptr+1); pk = buf2pk(ptr+1);
return(EncodeMarmaraCoinbaseOpRet(pk,height); return(EncodeMarmaraCoinbaseOpRet(pk,height));
} }
} }
return(scriptPubKey); return(scriptPubKey);