From 2417ee87877cd7affa6129e3f5d3834aeacfe737 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 2 Apr 2019 05:23:32 -1100 Subject: [PATCH] Test --- src/rpc/blockchain.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp index 2ff865f88..bc8302589 100644 --- a/src/rpc/blockchain.cpp +++ b/src/rpc/blockchain.cpp @@ -1186,7 +1186,7 @@ UniValue prices(const UniValue& params, bool fHelp) if ( fHelp || params.size() != 1 ) throw runtime_error("prices maxsamples\n"); LOCK(cs_main); - UniValue ret(UniValue::VOBJ); uint64_t seed; int64_t smoothed,*correlated; char name[64],*str; uint32_t rawprices[2048],*prices,*prices2; uint32_t i,width,j,numpricefeeds=-1,n,nextheight,offset,ht,num=0,daywindow = (3600*24/ASSETCHAINS_BLOCKTIME) + 1; + UniValue ret(UniValue::VOBJ); uint64_t seed,rngval; int64_t smoothed,*correlated; char name[64],*str; uint32_t rawprices[2048],*prices,*prices2; uint32_t i,width,j,numpricefeeds=-1,n,nextheight,offset,ht,num=0,daywindow = (3600*24/ASSETCHAINS_BLOCKTIME) + 1; if ( ASSETCHAINS_CBOPRET == 0 ) throw JSONRPCError(RPC_INVALID_PARAMETER, "only -ac_cbopret chains have prices"); @@ -1230,8 +1230,10 @@ UniValue prices(const UniValue& params, bool fHelp) ret.push_back(Pair("timestamps",timestamps)); ret.push_back(Pair("firstheight", (int64_t)nextheight-1-i)); } + rngval = seed; for (j=1; j