From 05f1a5d18f425455a2b7175fa5282e528d8a513a Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 28 Oct 2016 07:26:05 -0300 Subject: [PATCH] test --- src/rpcblockchain.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rpcblockchain.cpp b/src/rpcblockchain.cpp index 0a8f88d14..607500c70 100644 --- a/src/rpcblockchain.cpp +++ b/src/rpcblockchain.cpp @@ -388,13 +388,13 @@ int32_t komodo_paxprices(int32_t *heights,uint64_t *prices,int32_t max,char *bas Value paxprice(const Array& params, bool fHelp) { if ( fHelp || params.size() < 3 || params.size() > 4 ) - throw runtime_error("paxprice \"base\" \"rel\" height\n"); + throw runtime_error("paxprice \"base\" \"rel\" height amount\n"); LOCK(cs_main); Object ret; uint64_t basevolume=0,relvolume; std::string base = params[0].get_str(); std::string rel = params[1].get_str(); int32_t height = atoi(params[2].get_str().c_str()); - if ( (basevolume= COIN * atof(params[3].get_str().c_str())) == 0 ) + if ( params.size() == 3 || (basevolume= COIN * atof(params[3].get_str().c_str())) == 0 ) basevolume = COIN; relvolume = komodo_paxprice(height,(char *)base.c_str(),(char *)rel.c_str(),basevolume); ret.push_back(Pair("base", base));