From 7b8cefe19280659e2c3e7564478106b6009c23dc Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 19 Oct 2018 06:37:24 -1100 Subject: [PATCH] Wallettx2json raw confirmations --- src/cc/gateways.cpp | 2 +- src/wallet/rpcwallet.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/cc/gateways.cpp b/src/cc/gateways.cpp index d2c43ad56..1db08532a 100644 --- a/src/cc/gateways.cpp +++ b/src/cc/gateways.cpp @@ -191,7 +191,7 @@ uint8_t DecodeGatewaysBindOpRet(char *depositaddr,const CScript &scriptPubKey,st if ( N > 1 ) { strcpy(depositaddr,CBitcoinAddress(CScriptID(GetScriptForMultisig(M,pubkeys))).ToString().c_str()); - Getscriptaddress(depositaddr,GetScriptForMultisig(M,pubkeys)); + //Getscriptaddress(depositaddr,GetScriptForMultisig(M,pubkeys)); fprintf(stderr,"f.%c M.%d of N.%d size.%d -> %s\n",f,M,N,(int32_t)pubkeys.size(),depositaddr); } else Getscriptaddress(depositaddr,CScript() << ParseHex(HexStr(pubkeys[0])) << OP_CHECKSIG); } diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index c7d4f8a16..c9bffbb33 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -90,7 +90,8 @@ void WalletTxToJSON(const CWalletTx& wtx, UniValue& entry) { //int32_t i,n,txheight; uint32_t locktime; uint64_t interest = 0; int confirms = wtx.GetDepthInMainChain(); - entry.push_back(Pair("confirmations", confirms)); + entry.push_back(Pair("rawconfirmations", confirms)); + entry.push_back(Pair("confirmations", komodo_dpowconfs((int32_t)mapBlockIndex[wtx.hashBlock]->nHeight,confirms))); if (wtx.IsCoinBase()) entry.push_back(Pair("generated", true)); if (confirms > 0)