mirror of
https://github.com/wownero/wownero.git
synced 2026-11-25 18:23:54 +01:00
Blockchain: option for fast manual block popping
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2014-2024, The Monero Project
|
||||
// Copyright (c) 2014-2026, The Monero Project
|
||||
//
|
||||
// All rights reserved.
|
||||
//
|
||||
@@ -3174,7 +3174,7 @@ namespace cryptonote
|
||||
{
|
||||
RPC_TRACKER(pop_blocks);
|
||||
|
||||
m_core.get_blockchain_storage().pop_blocks(req.nblocks);
|
||||
m_core.get_blockchain_storage().pop_blocks(req.nblocks, req.keep_txs);
|
||||
|
||||
res.height = m_core.get_current_blockchain_height();
|
||||
res.status = CORE_RPC_STATUS_OK;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2014-2024, The Monero Project
|
||||
// Copyright (c) 2014-2026, The Monero Project
|
||||
//
|
||||
// All rights reserved.
|
||||
//
|
||||
@@ -101,7 +101,7 @@ inline const std::string get_rpc_status(const bool trusted_daemon, const std::st
|
||||
// advance which version they will stop working with
|
||||
// Don't go over 32767 for any of these
|
||||
#define CORE_RPC_VERSION_MAJOR 3
|
||||
#define CORE_RPC_VERSION_MINOR 17
|
||||
#define CORE_RPC_VERSION_MINOR 18
|
||||
#define MAKE_CORE_RPC_VERSION(major,minor) (((major)<<16)|(minor))
|
||||
#define CORE_RPC_VERSION MAKE_CORE_RPC_VERSION(CORE_RPC_VERSION_MAJOR, CORE_RPC_VERSION_MINOR)
|
||||
|
||||
@@ -2498,10 +2498,12 @@ inline const std::string get_rpc_status(const bool trusted_daemon, const std::st
|
||||
struct request_t: public rpc_request_base
|
||||
{
|
||||
uint64_t nblocks;
|
||||
bool keep_txs;
|
||||
|
||||
BEGIN_KV_SERIALIZE_MAP()
|
||||
KV_SERIALIZE_PARENT(rpc_request_base)
|
||||
KV_SERIALIZE(nblocks)
|
||||
KV_SERIALIZE_OPT(keep_txs, true)
|
||||
END_KV_SERIALIZE_MAP()
|
||||
};
|
||||
typedef epee::misc_utils::struct_init<request_t> request;
|
||||
|
||||
Reference in New Issue
Block a user