Adjust Indexer RPC for Sequencer and Explorer needs only

This commit is contained in:
Daniil Polyakov 2026-01-30 19:33:51 +03:00
parent e0729a1725
commit 2d0525ab31
3 changed files with 0 additions and 14 deletions

View File

@ -32,9 +32,6 @@ pub trait Rpc {
#[method(name = "getBlockByHash")]
async fn get_block_by_hash(&self, block_hash: Hash) -> Result<Block, ErrorObjectOwned>;
#[method(name = "getLastBlockId")]
async fn get_last_block_id(&self) -> Result<BlockId, ErrorObjectOwned>;
#[method(name = "getAccount")]
async fn get_account(&self, account_id: AccountId) -> Result<Account, ErrorObjectOwned>;

View File

@ -198,13 +198,6 @@ impl indexer_service_rpc::RpcServer for MockIndexerService {
.ok_or_else(|| ErrorObjectOwned::owned(-32001, "Block with hash not found", None::<()>))
}
async fn get_last_block_id(&self) -> Result<BlockId, ErrorObjectOwned> {
self.blocks
.last()
.map(|b| b.header.block_id)
.ok_or_else(|| ErrorObjectOwned::owned(-32001, "No blocks available", None::<()>))
}
async fn get_account(&self, account_id: AccountId) -> Result<Account, ErrorObjectOwned> {
self.accounts
.get(&account_id)

View File

@ -33,10 +33,6 @@ impl indexer_service_rpc::RpcServer for IndexerService {
todo!()
}
async fn get_last_block_id(&self) -> Result<BlockId, ErrorObjectOwned> {
todo!()
}
async fn get_account(&self, _account_id: AccountId) -> Result<Account, ErrorObjectOwned> {
todo!()
}