diff options
Diffstat (limited to 'src/rpc')
-rw-r--r-- | src/rpc/net.cpp | 6 | ||||
-rw-r--r-- | src/rpc/rawtransaction.cpp | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/rpc/net.cpp b/src/rpc/net.cpp index eea854c375..557b1296a6 100644 --- a/src/rpc/net.cpp +++ b/src/rpc/net.cpp @@ -198,11 +198,11 @@ static RPCHelpMan getpeerinfo() obj.pushKV("relaytxes", stats.fRelayTxes); obj.pushKV("lastsend", count_seconds(stats.m_last_send)); obj.pushKV("lastrecv", count_seconds(stats.m_last_recv)); - obj.pushKV("last_transaction", stats.nLastTXTime); - obj.pushKV("last_block", stats.nLastBlockTime); + obj.pushKV("last_transaction", count_seconds(stats.m_last_tx_time)); + obj.pushKV("last_block", count_seconds(stats.m_last_block_time)); obj.pushKV("bytessent", stats.nSendBytes); obj.pushKV("bytesrecv", stats.nRecvBytes); - obj.pushKV("conntime", stats.nTimeConnected); + obj.pushKV("conntime", count_seconds(stats.m_connected)); obj.pushKV("timeoffset", stats.nTimeOffset); if (stats.m_last_ping_time > 0us) { obj.pushKV("pingtime", CountSecondsDouble(stats.m_last_ping_time)); diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp index f2e8104e14..9be5c82311 100644 --- a/src/rpc/rawtransaction.cpp +++ b/src/rpc/rawtransaction.cpp @@ -1028,6 +1028,8 @@ static RPCHelpMan testmempoolaccept() continue; } const auto& tx_result = it->second; + // Package testmempoolaccept doesn't allow transactions to already be in the mempool. + CHECK_NONFATAL(tx_result.m_result_type != MempoolAcceptResult::ResultType::MEMPOOL_ENTRY); if (tx_result.m_result_type == MempoolAcceptResult::ResultType::VALID) { const CAmount fee = tx_result.m_base_fees.value(); // Check that fee does not exceed maximum fee |