From 8ef46649e55ecf00b4d04c5a828dfcc3498be0a7 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 15 Jan 2019 21:02:23 -1100 Subject: [PATCH] Fix --- src/cc/marmara.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cc/marmara.cpp b/src/cc/marmara.cpp index 94608e1a4..d37314e9e 100644 --- a/src/cc/marmara.cpp +++ b/src/cc/marmara.cpp @@ -669,6 +669,8 @@ UniValue MarmaraInfo(CPubKey refpk,int32_t firstheight,int32_t lastheight,int64_ { UniValue result(UniValue::VOBJ),a(UniValue::VARR); int32_t i,n,matches; int64_t totalamount=0; std::vector issuances; char coinaddr[64]; CPubKey Marmarapk; struct CCcontract_info *cp,C; + cp = CCinit(&C,EVAL_MARMARA); + Marmarapk = GetUnspendable(cp,0); result.push_back(Pair("result","success")); Getscriptaddress(coinaddr,CScript() << ParseHex(HexStr(Mypubkey())) << OP_CHECKSIG); result.push_back(Pair("myaddress",coinaddr)); @@ -687,8 +689,6 @@ UniValue MarmaraInfo(CPubKey refpk,int32_t firstheight,int32_t lastheight,int64_ result.push_back(Pair("minamount",ValueFromAmount(minamount))); result.push_back(Pair("maxamount",ValueFromAmount(maxamount))); result.push_back(Pair("currency",currency)); - cp = CCinit(&C,EVAL_MARMARA); - Marmarapk = GetUnspendable(cp,0); if ( (n= MarmaraGetCreditloops(totalamount,issuances,cp,firstheight,lastheight,minamount,maxamount,refpk,currency)) > 0 ) { result.push_back(Pair("n",n));