@@ -46,6 +46,7 @@
|
||||
#include <thread>
|
||||
|
||||
#include "paymentdisclosuredb.h"
|
||||
int32_t komodo_blockheight(uint256 hash);
|
||||
|
||||
using namespace libzcash;
|
||||
|
||||
@@ -677,7 +678,7 @@ bool AsyncRPCOperation_mergetoaddress::main_impl()
|
||||
if (mapBlockIndex.find(wtx.hashBlock) == mapBlockIndex.end()) {
|
||||
throw JSONRPCError(RPC_WALLET_ERROR, strprintf("mapBlockIndex does not contain block hash %s", wtx.hashBlock.ToString()));
|
||||
}
|
||||
wtxHeight = mapBlockIndex[wtx.hashBlock]->GetHeight();
|
||||
wtxHeight = komodo_blockheight(wtx.hashBlock);
|
||||
wtxDepth = wtx.GetDepthInMainChain();
|
||||
}
|
||||
LogPrint("zrpcunsafe", "%s: spending note (txid=%s, vjoinsplit=%d, ciphertext=%d, amount=%s, height=%d, confirmations=%d)\n",
|
||||
|
||||
@@ -55,6 +55,7 @@ using namespace libzcash;
|
||||
extern char ASSETCHAINS_SYMBOL[65];
|
||||
|
||||
int32_t komodo_dpowconfs(int32_t height,int32_t numconfs);
|
||||
int32_t komodo_blockheight(uint256 hash);
|
||||
int tx_height( const uint256 &hash );
|
||||
extern UniValue signrawtransaction(const UniValue& params, bool fHelp);
|
||||
extern UniValue sendrawtransaction(const UniValue& params, bool fHelp);
|
||||
@@ -836,7 +837,7 @@ bool AsyncRPCOperation_sendmany::main_impl() {
|
||||
if (mapBlockIndex.find(wtx.hashBlock) == mapBlockIndex.end()) {
|
||||
throw JSONRPCError(RPC_WALLET_ERROR, strprintf("mapBlockIndex does not contain block hash %s", wtx.hashBlock.ToString()));
|
||||
}
|
||||
wtxHeight = mapBlockIndex[wtx.hashBlock]->GetHeight();
|
||||
wtxHeight = komodo_blockheight(wtx.hashBlock);
|
||||
wtxDepth = wtx.GetDepthInMainChain();
|
||||
}
|
||||
LogPrint("zrpcunsafe", "%s: spending note (txid=%s, vjoinsplit=%d, ciphertext=%d, amount=%s, height=%d, confirmations=%d)\n",
|
||||
|
||||
@@ -122,10 +122,10 @@ void WalletTxToJSON(const CWalletTx& wtx, UniValue& entry)
|
||||
entry.push_back(Pair("generated", true));
|
||||
if (confirms > 0)
|
||||
{
|
||||
entry.push_back(Pair("confirmations", komodo_dpowconfs((int32_t)mapBlockIndex[wtx.hashBlock]->GetHeight(),confirms)));
|
||||
entry.push_back(Pair("confirmations", komodo_dpowconfs((int32_t)komodo_blockheight(wtx.hashBlock),confirms)));
|
||||
entry.push_back(Pair("blockhash", wtx.hashBlock.GetHex()));
|
||||
entry.push_back(Pair("blockindex", wtx.nIndex));
|
||||
entry.push_back(Pair("blocktime", mapBlockIndex[wtx.hashBlock]->GetBlockTime()));
|
||||
entry.push_back(Pair("blocktime", (uint64_t)komodo_blocktime(wtx.hashBlock)));
|
||||
entry.push_back(Pair("expiryheight", (int64_t)wtx.nExpiryHeight));
|
||||
} else entry.push_back(Pair("confirmations", confirms));
|
||||
uint256 hash = wtx.GetHash();
|
||||
@@ -1624,7 +1624,7 @@ UniValue ListReceived(const UniValue& params, bool fByAccounts)
|
||||
tallyitem& item = mapTally[address];
|
||||
item.nAmount += txout.nValue; // komodo_interest?
|
||||
item.nConf = min(item.nConf, nDepth);
|
||||
item.nHeight = mapBlockIndex[wtx.hashBlock]->GetHeight();
|
||||
item.nHeight = komodo_blockheight(wtx.hashBlock);
|
||||
item.txids.push_back(wtx.GetHash());
|
||||
if (mine & ISMINE_WATCH_ONLY)
|
||||
item.fIsWatchonly = true;
|
||||
|
||||
Reference in New Issue
Block a user