Test
This commit is contained in:
@@ -114,7 +114,7 @@ bool FaucetValidate(struct CCcontract_info *cp,Eval* eval,const CTransaction &tx
|
|||||||
fprintf(stderr,"check faucetget txid %s %02x/%02x\n",uint256_str(str,txid),hash[0],hash[31]);
|
fprintf(stderr,"check faucetget txid %s %02x/%02x\n",uint256_str(str,txid),hash[0],hash[31]);
|
||||||
if ( tx.vout[i].nValue != FAUCETSIZE )
|
if ( tx.vout[i].nValue != FAUCETSIZE )
|
||||||
return eval->Invalid("invalid faucet output");
|
return eval->Invalid("invalid faucet output");
|
||||||
else if ( (hash[0] & 0xff) != 0 || (hash[31] & 0xff) != 0 )
|
else if ( (hash[0] & 0x7f) != 0 || (hash[31] & 0x7f) != 0 )
|
||||||
return eval->Invalid("invalid faucetget txid");
|
return eval->Invalid("invalid faucetget txid");
|
||||||
retval = PreventCC(eval,tx,preventCCvins,numvins,preventCCvouts,numvouts);
|
retval = PreventCC(eval,tx,preventCCvins,numvins,preventCCvouts,numvouts);
|
||||||
if ( retval != 0 )
|
if ( retval != 0 )
|
||||||
@@ -185,7 +185,7 @@ std::string FaucetGet(uint64_t txfee)
|
|||||||
//for (j=0; j<32; j++)
|
//for (j=0; j<32; j++)
|
||||||
// fprintf(stderr,"%02x",hash[j]);
|
// fprintf(stderr,"%02x",hash[j]);
|
||||||
//fprintf(stderr," ");
|
//fprintf(stderr," ");
|
||||||
if ( (hash.bytes[0] & 0xff) == 0 && (hash.bytes[31] & 0xff) == 0 )
|
if ( (hash.bytes[0] & 0x7f) == 0 && (hash.bytes[31] & 0x7f) == 0 )
|
||||||
{
|
{
|
||||||
fprintf(stderr,"found valid txid after %d iterations %u\n",i,(uint32_t)time(NULL));
|
fprintf(stderr,"found valid txid after %d iterations %u\n",i,(uint32_t)time(NULL));
|
||||||
return(rawhex);
|
return(rawhex);
|
||||||
|
|||||||
Reference in New Issue
Block a user