Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
305fc86
add rpc server
hinto-janai Mar 28, 2025
0f35406
add init fn
hinto-janai Mar 29, 2025
9ed9b61
add layers
hinto-janai Apr 2, 2025
a65e041
Merge branch 'main' into rpc-server
hinto-janai Apr 15, 2025
386f303
docs
hinto-janai Apr 15, 2025
1c3cc7e
comments
hinto-janai Apr 15, 2025
f2cd202
move
hinto-janai Apr 15, 2025
c5785a0
warn
hinto-janai Apr 15, 2025
7b75701
split config
hinto-janai Apr 15, 2025
f4b407f
split
hinto-janai Apr 15, 2025
f6b2e42
fix toml
hinto-janai Apr 15, 2025
1b57675
impl p2p port
hinto-janai Apr 15, 2025
38c692f
fix tests
hinto-janai Apr 15, 2025
c03bb64
docs
hinto-janai Apr 16, 2025
bd07f14
doc
hinto-janai Apr 16, 2025
c71f642
remove (de)compression
hinto-janai Apr 30, 2025
02598ff
init rpc servers with handlers
hinto-janai May 1, 2025
d408af1
add `rpc.md`
hinto-janai May 1, 2025
3b7d0f5
Merge branch 'main' into rpc-server
hinto-janai May 7, 2025
61e9c7f
Merge branch 'main' into rpc-server
hinto-janai May 12, 2025
cf1fe0e
Merge branch 'main' into rpc-user
hinto-janai May 12, 2025
c5e2c3d
typo
hinto-janai May 12, 2025
d271bc6
sort
hinto-janai May 12, 2025
7dbd117
revert cargo.lock diff
hinto-janai May 12, 2025
11f8d64
🟣
hinto-janai May 14, 2025
be9e478
Merge branch 'main' into rpc-1
hinto-janai May 15, 2025
018386e
not_available()
hinto-janai May 15, 2025
950a9af
`advertise`
hinto-janai May 27, 2025
1675184
Update binaries/cuprated/src/config/rpc.rs
hinto-janai May 27, 2025
ed733d5
update tracing
hinto-janai May 27, 2025
94d1dff
Merge branch 'rpc-server' of github.com:hinto-janai/cuprate into rpc-…
hinto-janai May 27, 2025
850a19e
`tracing::field::display`
hinto-janai May 27, 2025
785c338
fix
hinto-janai May 27, 2025
912eaac
typo
hinto-janai May 27, 2025
a4a25c0
docs
hinto-janai May 27, 2025
eef8abc
Merge branch 'main' into rpc-server
hinto-janai May 27, 2025
3999a56
clippy
hinto-janai May 27, 2025
d1bedcf
remove comment_out
hinto-janai May 28, 2025
5c9338f
add test for `cuprate_helper::net::ip_is_local`
hinto-janai May 28, 2025
a143dec
Merge branch 'rpc-server' into rpc-1
hinto-janai May 28, 2025
fdf478a
Merge branch 'main' into rpc-1
hinto-janai May 28, 2025
7e3728b
Merge branch 'main' into rpc-1
hinto-janai May 30, 2025
923a9e4
fix args
hinto-janai May 30, 2025
4dcde70
`/get_outs`, `/get_height`
hinto-janai May 30, 2025
2ff6629
enable methods
hinto-janai May 30, 2025
188fbf4
Merge branch 'rpc-user' into rpc-1
hinto-janai May 30, 2025
60374db
apply
hinto-janai May 30, 2025
d8e0b8a
block fn
hinto-janai May 30, 2025
8883d8c
fix
hinto-janai May 30, 2025
ed9d6ae
clippy
hinto-janai May 30, 2025
dbf1973
Merge branch 'main' into rpc-1
hinto-janai May 30, 2025
2fb1246
book
hinto-janai May 31, 2025
38caf59
add warning
hinto-janai Jun 3, 2025
4fa7e36
update
hinto-janai Jun 3, 2025
d79976a
typos
hinto-janai Jun 3, 2025
cafa5c1
Update binaries/cuprated/src/rpc/handlers/helper.rs
hinto-janai Jun 4, 2025
6e55c89
fmt
hinto-janai Jun 4, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions binaries/cuprated/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ fn main() {
let tx_handler = IncomingTxHandler::init(
network_interfaces.clearnet_network_interface.clone(),
txpool_write_handle.clone(),
txpool_read_handle,
txpool_read_handle.clone(),
context_svc.clone(),
blockchain_read_handle.clone(),
);
Expand All @@ -149,15 +149,20 @@ fn main() {
blockchain::init_blockchain_manager(
network_interfaces.clearnet_network_interface,
blockchain_write_handle,
blockchain_read_handle,
txpool_write_handle,
blockchain_read_handle.clone(),
txpool_write_handle.clone(),
context_svc.clone(),
config.block_downloader_config(),
)
.await;

// Initialize the RPC server(s).
rpc::init_rpc_servers(config.rpc);
rpc::init_rpc_servers(
config.rpc,
blockchain_read_handle,
context_svc.clone(),
txpool_read_handle,
);

// Start the command listener.
if std::io::IsTerminal::is_terminal(&std::io::stdin()) {
Expand Down
20 changes: 8 additions & 12 deletions binaries/cuprated/src/rpc/handlers/bin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ use cuprate_types::{
};

use crate::rpc::{
handlers::{helper, shared},
handlers::{helper, shared, shared::not_available},
service::{blockchain, txpool},
CupratedRpcHandler,
};
Expand All @@ -44,17 +44,13 @@ pub async fn map_request(
use BinResponse as Resp;

Ok(match request {
Req::GetBlocks(r) => Resp::GetBlocks(get_blocks(state, r).await?),
Req::GetBlocksByHeight(r) => Resp::GetBlocksByHeight(get_blocks_by_height(state, r).await?),
Req::GetHashes(r) => Resp::GetHashes(get_hashes(state, r).await?),
Req::GetOutputIndexes(r) => Resp::GetOutputIndexes(get_output_indexes(state, r).await?),
Req::GetOuts(r) => Resp::GetOuts(get_outs(state, r).await?),
Req::GetTransactionPoolHashes(r) => {
Resp::GetTransactionPoolHashes(get_transaction_pool_hashes(state, r).await?)
}
Req::GetOutputDistribution(r) => {
Resp::GetOutputDistribution(get_output_distribution(state, r).await?)
}
Req::GetBlocks(r) => Resp::GetBlocks(not_available()?),
Req::GetBlocksByHeight(r) => Resp::GetBlocksByHeight(not_available()?),
Req::GetHashes(r) => Resp::GetHashes(not_available()?),
Req::GetOutputIndexes(r) => Resp::GetOutputIndexes(not_available()?),
Req::GetOuts(r) => Resp::GetOuts(not_available()?),
Req::GetTransactionPoolHashes(r) => Resp::GetTransactionPoolHashes(not_available()?),
Req::GetOutputDistribution(r) => Resp::GetOutputDistribution(not_available()?),
Comment on lines -47 to +53
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In binaries/cuprated/src/rpc/handlers/{bin,json_rpc,other_json}.rs, the request handler mapping function will route to not_available until manually enabled in future PRs.

The definition is...

})
}

Expand Down
13 changes: 5 additions & 8 deletions binaries/cuprated/src/rpc/handlers/helper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use cuprate_rpc_types::{
base::{AccessResponseBase, ResponseBase},
misc::BlockHeader,
};
use cuprate_types::HardFork;
use cuprate_types::{Chain, HardFork};
use monero_serai::transaction::Timelock;

use crate::rpc::{
Expand Down Expand Up @@ -55,18 +55,15 @@ pub(super) async fn block_header(
let pow_hash = if fill_pow_hash {
let seed_height =
cuprate_consensus_rules::blocks::randomx_seed_height(u64_to_usize(height));
let seed_hash = blockchain::block_hash(
&mut state.blockchain_read,
height,
todo!("access to `cuprated`'s Chain"),
)
.await?;
let seed_hash =
blockchain::block_hash(&mut state.blockchain_read, height, Chain::Main).await?;

Some(
blockchain_context::calculate_pow(
&mut state.blockchain_context,
hardfork,
block,
// TODO: expensive clone
block.clone(),
seed_hash,
)
.await?,
Expand Down
93 changes: 40 additions & 53 deletions binaries/cuprated/src/rpc/handlers/json_rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ use crate::{
constants::VERSION_BUILD,
rpc::{
constants::{FIELD_NOT_SUPPORTED, UNSUPPORTED_RPC_CALL},
handlers::{helper, shared},
handlers::{helper, shared, shared::not_available},
service::{address_book, blockchain, blockchain_context, blockchain_manager, txpool},
CupratedRpcHandler,
},
Expand All @@ -77,11 +77,11 @@ pub async fn map_request(
use JsonRpcResponse as Resp;

Ok(match request {
Req::GetBlockTemplate(r) => Resp::GetBlockTemplate(get_block_template(state, r).await?),
Req::GetBlockTemplate(r) => Resp::GetBlockTemplate(not_available()?),
Req::GetBlockCount(r) => Resp::GetBlockCount(get_block_count(state, r).await?),
Req::OnGetBlockHash(r) => Resp::OnGetBlockHash(on_get_block_hash(state, r).await?),
Req::SubmitBlock(r) => Resp::SubmitBlock(submit_block(state, r).await?),
Req::GenerateBlocks(r) => Resp::GenerateBlocks(generate_blocks(state, r).await?),
Req::SubmitBlock(r) => Resp::SubmitBlock(not_available()?),
Req::GenerateBlocks(r) => Resp::GenerateBlocks(not_available()?),
Req::GetLastBlockHeader(r) => {
Resp::GetLastBlockHeader(get_last_block_header(state, r).await?)
}
Expand All @@ -95,33 +95,25 @@ pub async fn map_request(
Resp::GetBlockHeadersRange(get_block_headers_range(state, r).await?)
}
Req::GetBlock(r) => Resp::GetBlock(get_block(state, r).await?),
Req::GetConnections(r) => Resp::GetConnections(get_connections(state, r).await?),
Req::GetInfo(r) => Resp::GetInfo(get_info(state, r).await?),
Req::HardForkInfo(r) => Resp::HardForkInfo(hard_fork_info(state, r).await?),
Req::SetBans(r) => Resp::SetBans(set_bans(state, r).await?),
Req::GetBans(r) => Resp::GetBans(get_bans(state, r).await?),
Req::Banned(r) => Resp::Banned(banned(state, r).await?),
Req::FlushTransactionPool(r) => {
Resp::FlushTransactionPool(flush_transaction_pool(state, r).await?)
}
Req::GetOutputHistogram(r) => {
Resp::GetOutputHistogram(get_output_histogram(state, r).await?)
}
Req::GetCoinbaseTxSum(r) => Resp::GetCoinbaseTxSum(get_coinbase_tx_sum(state, r).await?),
Req::GetVersion(r) => Resp::GetVersion(get_version(state, r).await?),
Req::GetFeeEstimate(r) => Resp::GetFeeEstimate(get_fee_estimate(state, r).await?),
Req::GetAlternateChains(r) => {
Resp::GetAlternateChains(get_alternate_chains(state, r).await?)
}
Req::RelayTx(r) => Resp::RelayTx(relay_tx(state, r).await?),
Req::SyncInfo(r) => Resp::SyncInfo(sync_info(state, r).await?),
Req::GetTransactionPoolBacklog(r) => {
Resp::GetTransactionPoolBacklog(get_transaction_pool_backlog(state, r).await?)
}
Req::GetMinerData(r) => Resp::GetMinerData(get_miner_data(state, r).await?),
Req::PruneBlockchain(r) => Resp::PruneBlockchain(prune_blockchain(state, r).await?),
Req::CalcPow(r) => Resp::CalcPow(calc_pow(state, r).await?),
Req::AddAuxPow(r) => Resp::AddAuxPow(add_aux_pow(state, r).await?),
Req::GetConnections(r) => Resp::GetConnections(not_available()?),
Req::GetInfo(r) => Resp::GetInfo(not_available()?),
Req::HardForkInfo(r) => Resp::HardForkInfo(not_available()?),
Req::SetBans(r) => Resp::SetBans(not_available()?),
Req::GetBans(r) => Resp::GetBans(not_available()?),
Req::Banned(r) => Resp::Banned(not_available()?),
Req::FlushTransactionPool(r) => Resp::FlushTransactionPool(not_available()?),
Req::GetOutputHistogram(r) => Resp::GetOutputHistogram(not_available()?),
Req::GetCoinbaseTxSum(r) => Resp::GetCoinbaseTxSum(not_available()?),
Req::GetVersion(r) => Resp::GetVersion(not_available()?),
Req::GetFeeEstimate(r) => Resp::GetFeeEstimate(not_available()?),
Req::GetAlternateChains(r) => Resp::GetAlternateChains(not_available()?),
Req::RelayTx(r) => Resp::RelayTx(not_available()?),
Req::SyncInfo(r) => Resp::SyncInfo(not_available()?),
Req::GetTransactionPoolBacklog(r) => Resp::GetTransactionPoolBacklog(not_available()?),
Req::GetMinerData(r) => Resp::GetMinerData(not_available()?),
Req::PruneBlockchain(r) => Resp::PruneBlockchain(not_available()?),
Req::CalcPow(r) => Resp::CalcPow(not_available()?),
Req::AddAuxPow(r) => Resp::AddAuxPow(not_available()?),

// Unsupported RPC calls.
Req::GetTxIdsLoose(_) | Req::FlushCache(_) => return Err(anyhow!(UNSUPPORTED_RPC_CALL)),
Expand Down Expand Up @@ -172,7 +164,7 @@ async fn get_block_template(
seed_hash,
next_seed_hash,
} = *blockchain_manager::create_block_template(
&mut state.blockchain_manager,
todo!(),
prev_block,
request.wallet_address,
request.extra_nonce.0,
Expand Down Expand Up @@ -242,7 +234,7 @@ async fn submit_block(
let block_id = Hex(block.hash());

// Attempt to relay the block.
blockchain_manager::relay_block(&mut state.blockchain_manager, Box::new(block)).await?;
blockchain_manager::relay_block(todo!(), Box::new(block)).await?;

Ok(SubmitBlockResponse {
base: helper::response_base(false),
Expand All @@ -269,7 +261,7 @@ async fn generate_blocks(
};

let (blocks, height) = blockchain_manager::generate_blocks(
&mut state.blockchain_manager,
todo!(),
request.amount_of_blocks,
prev_block,
request.starting_nonce,
Expand Down Expand Up @@ -479,7 +471,7 @@ async fn get_info(
(String::new(), false)
};

let busy_syncing = blockchain_manager::syncing(&mut state.blockchain_manager).await?;
let busy_syncing = blockchain_manager::syncing(todo!()).await?;

let (cumulative_difficulty, cumulative_difficulty_top64) =
split_u128_into_low_high_bits(cumulative_difficulty);
Expand Down Expand Up @@ -524,12 +516,10 @@ async fn get_info(
let rpc_connections_count = if restricted { 0 } else { 0 };

let start_time = if restricted { 0 } else { *START_INSTANT_UNIX };
let synchronized = blockchain_manager::synced(&mut state.blockchain_manager).await?;
let synchronized = blockchain_manager::synced(todo!()).await?;

let target_height = blockchain_manager::target_height(&mut state.blockchain_manager).await?;
let target = blockchain_manager::target(&mut state.blockchain_manager)
.await?
.as_secs();
let target_height = blockchain_manager::target_height(todo!()).await?;
let target = blockchain_manager::target(todo!()).await?.as_secs();
let top_block_hash = Hex(c.top_hash);

let tx_count = blockchain::total_tx_count(&mut state.blockchain_read).await?;
Expand Down Expand Up @@ -738,7 +728,7 @@ async fn flush_transaction_pool(
.map(|h| h.0)
.collect::<Vec<[u8; 32]>>();

txpool::flush(&mut state.txpool_manager, tx_hashes).await?;
txpool::flush(todo!(), tx_hashes).await?;

Ok(FlushTransactionPoolResponse { status: Status::Ok })
}
Expand Down Expand Up @@ -807,7 +797,7 @@ async fn get_version(
_: GetVersionRequest,
) -> Result<GetVersionResponse, Error> {
let current_height = helper::top_height(&mut state).await?.0;
let target_height = blockchain_manager::target_height(&mut state.blockchain_manager).await?;
let target_height = blockchain_manager::target_height(todo!()).await?;

let mut hard_forks = Vec::with_capacity(HardFork::COUNT);

Expand Down Expand Up @@ -880,7 +870,7 @@ async fn relay_tx(
.map(|h| h.0)
.collect::<Vec<[u8; 32]>>();

txpool::relay(&mut state.txpool_manager, tx_hashes).await?;
txpool::relay(todo!(), tx_hashes).await?;

Ok(RelayTxResponse { status: Status::Ok })
}
Expand All @@ -892,20 +882,19 @@ async fn sync_info(
) -> Result<SyncInfoResponse, Error> {
let height = usize_to_u64(state.blockchain_context.blockchain_context().chain_height);

let target_height = blockchain_manager::target_height(&mut state.blockchain_manager).await?;
let target_height = blockchain_manager::target_height(todo!()).await?;

let peers = address_book::connection_info::<ClearNet>(&mut DummyAddressBook)
.await?
.into_iter()
.map(|info| SyncInfoPeer { info })
.collect();

let next_needed_pruning_seed =
blockchain_manager::next_needed_pruning_seed(&mut state.blockchain_manager)
.await?
.compress();
let next_needed_pruning_seed = blockchain_manager::next_needed_pruning_seed(todo!())
.await?
.compress();

let spans = blockchain_manager::spans::<ClearNet>(&mut state.blockchain_manager).await?;
let spans = blockchain_manager::spans::<ClearNet>(todo!()).await?;

// <https://github.com/Cuprate/cuprate/pull/320#discussion_r1811063772>
let overview = String::from(FIELD_NOT_SUPPORTED);
Expand Down Expand Up @@ -994,10 +983,8 @@ async fn prune_blockchain(
mut state: CupratedRpcHandler,
request: PruneBlockchainRequest,
) -> Result<PruneBlockchainResponse, Error> {
let pruned = blockchain_manager::pruned(&mut state.blockchain_manager).await?;
let pruning_seed = blockchain_manager::prune(&mut state.blockchain_manager)
.await?
.compress();
let pruned = blockchain_manager::pruned(todo!()).await?;
let pruning_seed = blockchain_manager::prune(todo!()).await?.compress();

Ok(PruneBlockchainResponse {
base: helper::response_base(false),
Expand Down
63 changes: 26 additions & 37 deletions binaries/cuprated/src/rpc/handlers/other_json.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ use cuprate_types::{
use crate::{
rpc::{
constants::UNSUPPORTED_RPC_CALL,
handlers::{helper, shared},
handlers::{helper, shared, shared::not_available},
service::{address_book, blockchain, blockchain_context, blockchain_manager, txpool},
CupratedRpcHandler,
},
Expand All @@ -66,36 +66,26 @@ pub async fn map_request(

Ok(match request {
Req::GetHeight(r) => Resp::GetHeight(get_height(state, r).await?),
Req::GetTransactions(r) => Resp::GetTransactions(get_transactions(state, r).await?),
Req::GetAltBlocksHashes(r) => {
Resp::GetAltBlocksHashes(get_alt_blocks_hashes(state, r).await?)
}
Req::IsKeyImageSpent(r) => Resp::IsKeyImageSpent(is_key_image_spent(state, r).await?),
Req::SendRawTransaction(r) => {
Resp::SendRawTransaction(send_raw_transaction(state, r).await?)
}
Req::SaveBc(r) => Resp::SaveBc(save_bc(state, r).await?),
Req::GetPeerList(r) => Resp::GetPeerList(get_peer_list(state, r).await?),
Req::SetLogLevel(r) => Resp::SetLogLevel(set_log_level(state, r).await?),
Req::SetLogCategories(r) => Resp::SetLogCategories(set_log_categories(state, r).await?),
Req::GetTransactionPool(r) => {
Resp::GetTransactionPool(get_transaction_pool(state, r).await?)
}
Req::GetTransactionPoolStats(r) => {
Resp::GetTransactionPoolStats(get_transaction_pool_stats(state, r).await?)
}
Req::StopDaemon(r) => Resp::StopDaemon(stop_daemon(state, r).await?),
Req::GetLimit(r) => Resp::GetLimit(get_limit(state, r).await?),
Req::SetLimit(r) => Resp::SetLimit(set_limit(state, r).await?),
Req::OutPeers(r) => Resp::OutPeers(out_peers(state, r).await?),
Req::InPeers(r) => Resp::InPeers(in_peers(state, r).await?),
Req::GetNetStats(r) => Resp::GetNetStats(get_net_stats(state, r).await?),
Req::GetOuts(r) => Resp::GetOuts(get_outs(state, r).await?),
Req::PopBlocks(r) => Resp::PopBlocks(pop_blocks(state, r).await?),
Req::GetTransactionPoolHashes(r) => {
Resp::GetTransactionPoolHashes(get_transaction_pool_hashes(state, r).await?)
}
Req::GetPublicNodes(r) => Resp::GetPublicNodes(get_public_nodes(state, r).await?),
Req::GetTransactions(r) => Resp::GetTransactions(not_available()?),
Req::GetAltBlocksHashes(r) => Resp::GetAltBlocksHashes(not_available()?),
Req::IsKeyImageSpent(r) => Resp::IsKeyImageSpent(not_available()?),
Req::SendRawTransaction(r) => Resp::SendRawTransaction(not_available()?),
Req::SaveBc(r) => Resp::SaveBc(not_available()?),
Req::GetPeerList(r) => Resp::GetPeerList(not_available()?),
Req::SetLogLevel(r) => Resp::SetLogLevel(not_available()?),
Req::SetLogCategories(r) => Resp::SetLogCategories(not_available()?),
Req::GetTransactionPool(r) => Resp::GetTransactionPool(not_available()?),
Req::GetTransactionPoolStats(r) => Resp::GetTransactionPoolStats(not_available()?),
Req::StopDaemon(r) => Resp::StopDaemon(not_available()?),
Req::GetLimit(r) => Resp::GetLimit(not_available()?),
Req::SetLimit(r) => Resp::SetLimit(not_available()?),
Req::OutPeers(r) => Resp::OutPeers(not_available()?),
Req::InPeers(r) => Resp::InPeers(not_available()?),
Req::GetNetStats(r) => Resp::GetNetStats(not_available()?),
Req::GetOuts(r) => Resp::GetOuts(not_available()?),
Req::PopBlocks(r) => Resp::PopBlocks(not_available()?),
Req::GetTransactionPoolHashes(r) => Resp::GetTransactionPoolHashes(not_available()?),
Req::GetPublicNodes(r) => Resp::GetPublicNodes(not_available()?),

// Unsupported requests.
Req::SetBootstrapDaemon(_)
Expand Down Expand Up @@ -452,9 +442,9 @@ async fn send_raw_transaction(
}
}

// TODO: handle to txpool service.
let tx_relay_checks =
txpool::check_maybe_relay_local(&mut state.txpool_manager, tx, !request.do_not_relay)
.await?;
txpool::check_maybe_relay_local(todo!(), tx, !request.do_not_relay).await?;

if tx_relay_checks.is_empty() {
return Ok(resp);
Expand Down Expand Up @@ -496,7 +486,7 @@ async fn send_raw_transaction(

/// <https://github.com/monero-project/monero/blob/cc73fe71162d564ffda8e549b79a350bca53c454/src/rpc/core_rpc_server.cpp#L1525-L1535>
async fn save_bc(mut state: CupratedRpcHandler, _: SaveBcRequest) -> Result<SaveBcResponse, Error> {
blockchain_manager::sync(&mut state.blockchain_manager).await?;
blockchain_manager::sync(todo!()).await?;

Ok(SaveBcResponse {
base: ResponseBase::OK,
Expand Down Expand Up @@ -554,7 +544,7 @@ async fn stop_daemon(
mut state: CupratedRpcHandler,
_: StopDaemonRequest,
) -> Result<StopDaemonResponse, Error> {
blockchain_manager::stop(&mut state.blockchain_manager).await?;
blockchain_manager::stop(todo!()).await?;
Ok(StopDaemonResponse { status: Status::Ok })
}

Expand Down Expand Up @@ -658,8 +648,7 @@ async fn pop_blocks(
mut state: CupratedRpcHandler,
request: PopBlocksRequest,
) -> Result<PopBlocksResponse, Error> {
let height =
blockchain_manager::pop_blocks(&mut state.blockchain_manager, request.nblocks).await?;
let height = blockchain_manager::pop_blocks(todo!(), request.nblocks).await?;

Ok(PopBlocksResponse {
base: helper::response_base(false),
Expand Down
Loading