This commit is contained in:
jl777
2018-07-22 13:25:40 -11:00
parent a5c286bf78
commit 37e67a2ad6
2 changed files with 7 additions and 1 deletions

View File

@@ -97,9 +97,15 @@ bool ConstrainVout(CTxOut vout,int32_t CCflag,char *cmpaddr,uint64_t nValue)
return(false);
}
else if ( cmpaddr != 0 && (Getscriptaddress(destaddr,vout.scriptPubKey) == 0 || strcmp(destaddr,cmpaddr) != 0) )
{
fprintf(stderr,"constrain vout error addr\n");
return(false);
}
else if ( (nValue == 0 && vout.nValue < 10000) || nValue != vout.nValue )
{
fprintf(stderr,"constrain vout error nValue %.8f vs %.8f\n",(double)nValue/COIN,(double)vout.nValue/COIN);
return(false);
}
else return(true);
}