From 98a1f520ee249ebb2d473ce91ae1026d8c757882 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 9 Sep 2018 22:08:57 -1100 Subject: [PATCH] Test --- src/wallet/rpcwallet.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 61b376c15..00a73a2fe 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -4857,6 +4857,7 @@ int32_t ensure_CCrequirements() #include "../cc/CClotto.h" #include "../cc/CCchannels.h" #include "../cc/CCOracles.h" +#include "../cc/CCGateways.h" UniValue CCaddress(struct CCcontract_info *cp,char *name,std::vector &pubkey) { @@ -5420,10 +5421,10 @@ UniValue gatewaysbind(const UniValue& params, bool fHelp) throw runtime_error("to use CC contracts, you need to launch daemon with valid -pubkey= for an address in your wallet\n"); tokenid = Parseuint256((char *)params[0].get_str().c_str()); coin = params[1].get_str(); - tokensupply = atol((char *)params[2].get_str().c_str()); + totalsupply = atol((char *)params[2].get_str().c_str()); M = atoi((char *)params[3].get_str().c_str()); N = atoi((char *)params[4].get_str().c_str()); - if ( M > N || N == 0 || N > 15 || tokensupply < COIN/100 || tokenid == zeroid ) + if ( M > N || N == 0 || N > 15 || totalsupply < COIN/100 || tokenid == zeroid ) throw runtime_error("illegal M or N > 15 or tokensupply or invalid tokenid\n"); pubkeys.resize(N); for (i=0; ipubkeys,int32_t height,std::string refcoin,uint256 cointxid,std::string deposithex,std::vectorproof,std::vector claimpubkey,int64_t amount) if ( hex.size() > 0 ) { @@ -5456,7 +5457,7 @@ UniValue gatewaysdeposit(const UniValue& params, bool fHelp) UniValue gatewaysclaim(const UniValue& params, bool fHelp) { - std::string hex; + UniValue result(UniValue::VOBJ); std::string hex; // std::string GatewaysClaim(uint64_t txfee,uint256 bindtxid,std::string coin,uint256 deposittxid,std::string claimaddr,int64_t amount) if ( hex.size() > 0 ) { @@ -5468,7 +5469,7 @@ UniValue gatewaysclaim(const UniValue& params, bool fHelp) UniValue gatewayswithdraw(const UniValue& params, bool fHelp) { - std::string hex; + UniValue result(UniValue::VOBJ); std::string hex; // std::string GatewaysWithdraw(uint64_t txfee,uint256 bindtxid,std::string refcoin,std::vector withdrawpub,int64_t amount) if ( hex.size() > 0 ) {