diff --git a/src/cc/gateways.cpp b/src/cc/gateways.cpp index 5d803a80e..da94822a7 100644 --- a/src/cc/gateways.cpp +++ b/src/cc/gateways.cpp @@ -956,7 +956,7 @@ std::string GatewaysBind(uint64_t txfee,std::string coin,uint256 tokenid,int64_t prefix2 = p2; wiftype = p3; taddr = p4; - LogPrint("gatewayscc-1","set prefix %d, prefix2 %d, wiftype %d for %s\n",prefix,prefix2,wiftype,coin.c_str()); + LogPrint("gatewayscc-1","set prefix %d, prefix2 %d, wiftype %d, taddr %d for %s\n",prefix,prefix2,wiftype,taddr,coin.c_str()); } if ( N == 0 || N > 15 || M > N ) { diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index f49246995..a19eebb20 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -6349,7 +6349,7 @@ UniValue gatewaysbind(const UniValue& params, bool fHelp) UniValue result(UniValue::VOBJ); uint256 tokenid,oracletxid; int32_t i; int64_t totalsupply; std::vector pubkeys; uint8_t M,N,p1,p2,p3,p4=0; std::string hex,coin; std::vector pubkey; - if ( fHelp || params.size() < 9 ) + if ( fHelp || params.size() < 10 ) throw runtime_error("gatewaysbind tokenid oracletxid coin tokensupply M N pubkey(s) pubtype p2shtype wiftype [taddr]\n"); if ( ensure_CCrequirements(EVAL_GATEWAYS) < 0 ) throw runtime_error("to use CC contracts, you need to launch daemon with valid -pubkey= for an address in your wallet\n"); @@ -6363,10 +6363,10 @@ UniValue gatewaysbind(const UniValue& params, bool fHelp) N = atoi((char *)params[5].get_str().c_str()); 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"); + if ( params.size() < 6+N+3 ) + throw runtime_error("not enough parameters for N pubkeys\n"); for (i=0; i 0 )