Prevent unlocking the fundingtxid
This commit is contained in:
@@ -245,8 +245,8 @@ bool RewardsValidate(struct CCcontract_info *cp,Eval* eval,const CTransaction &t
|
|||||||
//vout.1: normal output to unlock address
|
//vout.1: normal output to unlock address
|
||||||
//vout.n-1: opreturn 'U' sbits fundingtxid
|
//vout.n-1: opreturn 'U' sbits fundingtxid
|
||||||
char str[65],str2[65];
|
char str[65],str2[65];
|
||||||
fprintf(stderr,"funding.%s vs %s\n",uint256_str(str,fundingtxid),uint256_str(str2,txid));
|
fprintf(stderr,"funding.%s vs %s\n",uint256_str(str,fundingtxid),uint256_str(str2,tx.vin[0].prevout.hash));
|
||||||
if ( fundingtxid == txid )
|
if ( fundingtxid == tx.vin[0].prevout.hash )
|
||||||
return eval->Invalid("cant unlock fundingtxid");
|
return eval->Invalid("cant unlock fundingtxid");
|
||||||
else if ( eval->GetTxUnconfirmed(tx.vin[0].prevout.hash,vinTx,hashBlock) == 0 )
|
else if ( eval->GetTxUnconfirmed(tx.vin[0].prevout.hash,vinTx,hashBlock) == 0 )
|
||||||
return eval->Invalid("always should find vin.0, but didnt");
|
return eval->Invalid("always should find vin.0, but didnt");
|
||||||
|
|||||||
Reference in New Issue
Block a user