corr unspendable addr for 'S'

This commit is contained in:
dimxy
2019-01-16 19:21:41 +05:00
parent 401737d208
commit 0588f5dc67
2 changed files with 13 additions and 9 deletions

View File

@@ -334,6 +334,9 @@ bool AssetsValidate(struct CCcontract_info *cpAssets,Eval* eval,const CTransacti
//'S'.vout.2: vin.2 value to original pubkey [origpubkey]
//vout.3: normal output for change (if any)
//'S'.vout.n-1: opreturn [EVAL_ASSETS] ['S'] [assetid] [amount of coin still required] [origpubkey]
char dualEvalUnspendableAddr[64];
GetTokensCCaddress(cpAssets, dualEvalUnspendableAddr, GetUnspendable(cpAssets, NULL));
if( (assetoshis = AssetValidateSellvin(cpAssets, eval, totalunits, tmporigpubkey, tokensCCaddr, origaddr, tx, assetid)) == 0 )
return(false);
else if( numvouts < 3 )
@@ -352,7 +355,7 @@ bool AssetsValidate(struct CCcontract_info *cpAssets,Eval* eval,const CTransacti
return eval->Invalid("normal vout1 for fillask");
else if( remaining_price != 0 )
{
if ( ConstrainVout(tx.vout[0], 1, (char *)cpAssets->unspendableCCaddr, 0) == 0 )
if ( ConstrainVout(tx.vout[0], 1, dualEvalUnspendableAddr /*(char *)cpAssets->unspendableCCaddr*/, 0) == 0 )
return eval->Invalid("mismatched vout0 assets unspendable CCaddr for fill sell");
}
}