Fix cancel roc
This commit is contained in:
@@ -185,17 +185,6 @@ bool AssetValidate(Eval* eval,CTransaction &tx,int32_t numvouts,uint8_t funcid,u
|
|||||||
//vout.n-1: opreturn [EVAL_ASSETS] ['o']
|
//vout.n-1: opreturn [EVAL_ASSETS] ['o']
|
||||||
if ( (nValue= AssetValidateBuyvin(eval,tmpprice,tmporigpubkey,CCaddr,origaddr,tx,assetid)) == 0 )
|
if ( (nValue= AssetValidateBuyvin(eval,tmpprice,tmporigpubkey,CCaddr,origaddr,tx,assetid)) == 0 )
|
||||||
return(false);
|
return(false);
|
||||||
else if ( tmporigpubkey != origpubkey )
|
|
||||||
{
|
|
||||||
int32_t z;
|
|
||||||
for (z=31; z>=0; z--)
|
|
||||||
fprintf(stderr,"%02x",((uint8_t *)&tmporigpubkey)[z]);
|
|
||||||
fprintf(stderr," from buyvin \n");
|
|
||||||
for (z=31; z>=0; z--)
|
|
||||||
fprintf(stderr,"%02x",((uint8_t *)&origpubkey)[z]);
|
|
||||||
fprintf(stderr," origpubkey\n");
|
|
||||||
return eval->Invalid("mismatched origpubkeys for cancelbuy");
|
|
||||||
}
|
|
||||||
else if ( ConstrainVout(tx.vout[0],0,origaddr,nValue) == 0 )
|
else if ( ConstrainVout(tx.vout[0],0,origaddr,nValue) == 0 )
|
||||||
return eval->Invalid("invalid refund for cancelbuy");
|
return eval->Invalid("invalid refund for cancelbuy");
|
||||||
preventCCvins = 1;
|
preventCCvins = 1;
|
||||||
@@ -261,8 +250,6 @@ bool AssetValidate(Eval* eval,CTransaction &tx,int32_t numvouts,uint8_t funcid,u
|
|||||||
//vout.n-1: opreturn [EVAL_ASSETS] ['x'] [assetid]
|
//vout.n-1: opreturn [EVAL_ASSETS] ['x'] [assetid]
|
||||||
if ( (assetoshis= AssetValidateSellvin(eval,tmpprice,tmporigpubkey,CCaddr,origaddr,tx,assetid)) == 0 )
|
if ( (assetoshis= AssetValidateSellvin(eval,tmpprice,tmporigpubkey,CCaddr,origaddr,tx,assetid)) == 0 )
|
||||||
return(false);
|
return(false);
|
||||||
else if ( tmporigpubkey != origpubkey )
|
|
||||||
return eval->Invalid("mismatched origpubkeys for cancel");
|
|
||||||
else if ( ConstrainVout(tx.vout[0],1,CCaddr,assetoshis) == 0 )
|
else if ( ConstrainVout(tx.vout[0],1,CCaddr,assetoshis) == 0 )
|
||||||
return eval->Invalid("invalid vout for cancel");
|
return eval->Invalid("invalid vout for cancel");
|
||||||
preventCCvins = 2;
|
preventCCvins = 2;
|
||||||
|
|||||||
Reference in New Issue
Block a user