Fix bug in FaucetGet where it returns an int instead of a string

This commit is contained in:
Jonathan "Duke" Leto
2018-08-10 18:10:21 +02:00
parent ba0f55ac2f
commit 9b30af9799
3 changed files with 10 additions and 6 deletions

View File

@@ -169,7 +169,7 @@ std::string FaucetGet(uint64_t txfee)
mtx.vout.push_back(CTxOut(nValue,CScript() << ParseHex(HexStr(mypk)) << OP_CHECKSIG));
return(FinalizeCCTx(-1LL,cp,mtx,mypk,txfee,opret));
} else fprintf(stderr,"cant find faucet inputs\n");
return(0);
return("");
}
std::string FaucetFund(uint64_t txfee,int64_t funds)

View File

@@ -5179,7 +5179,10 @@ UniValue faucetget(const UniValue& params, bool fHelp)
{
result.push_back(Pair("result", "success"));
result.push_back(Pair("hex", hex));
} else result.push_back(Pair("error", "couldnt create faucet get transaction"));
} else {
result.push_back(Pair("result", "error"));
result.push_back(Pair("error", "couldnt create faucet get transaction"));
}
return(result);
}