From 32406f1be77e99574767df11b521bfc73ce249b7 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 24 Jul 2018 00:23:47 -1100 Subject: [PATCH] Fix --- src/cc/faucet.cpp | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/src/cc/faucet.cpp b/src/cc/faucet.cpp index cc76fa8e6..98295c300 100644 --- a/src/cc/faucet.cpp +++ b/src/cc/faucet.cpp @@ -26,6 +26,8 @@ To implement this, we can simply make any faucet vout fund the faucet. Then we can limit the number of confirmed utxo by combining faucet outputs and then only using utxo which are confirmed. This combined with a vout size limit will drastically limit the funds that can be withdrawn from the faucet. */ +// start of consensus code + uint64_t IsFaucetvout(const CTransaction& tx,int32_t v) { char destaddr[64]; @@ -110,27 +112,9 @@ bool FaucetValidate(struct CCcontract_info *cp,Eval* eval,const CTransaction &tx } } } +// end of consensus code -/*bool ProcessFaucet(Eval* eval, std::vector paramsNull,const CTransaction &ctx, unsigned int nIn) -{ - static uint256 prevtxid; uint256 txid; - txid = ctx.GetHash(); - if ( txid == prevtxid ) - return(true); - fprintf(stderr,"start faucet validate\n"); - if ( paramsNull.size() != 0 ) // Don't expect params - return eval->Invalid("Cannot have params"); - else if ( ctx.vout.size() == 0 ) - return eval->Invalid("no-vouts"); - if ( FaucetValidate(eval,ctx) != 0 ) - { - prevtxid = txid; - fprintf(stderr,"faucet validated\n"); - return(true); - } - fprintf(stderr,"faucet validate failed\n"); - return(false); -}*/ +// helper functions for rpc calls in rpcwallet.cpp uint64_t AddFaucetInputs(CMutableTransaction &mtx,CPubKey pk,uint64_t total,int32_t maxinputs) {