This commit is contained in:
jl777
2018-07-22 13:14:45 -11:00
parent 65a961ff06
commit 36e071fcb3
3 changed files with 31 additions and 1 deletions

View File

@@ -92,7 +92,10 @@ bool ConstrainVout(CTxOut vout,int32_t CCflag,char *cmpaddr,uint64_t nValue)
{
char destaddr[64];
if ( vout.scriptPubKey.IsPayToCryptoCondition() != CCflag )
{
fprintf(stderr,"constrain vout error isCC %d vs %d CCflag\n",vout.scriptPubKey.IsPayToCryptoCondition(),CCflag);
return(false);
}
else if ( cmpaddr != 0 && (Getscriptaddress(destaddr,vout.scriptPubKey) == 0 || strcmp(destaddr,cmpaddr) != 0) )
return(false);
else if ( (nValue == 0 && vout.nValue < 10000) || nValue != vout.nValue )