Skip to content

Commit 4e24281

Browse files
committed
Reorder rpc methods
1 parent e4ca5aa commit 4e24281

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

node/src/rpc.rs

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -102,15 +102,15 @@ pub trait Rpc {
102102
#[method(name = "getspaceowner")]
103103
async fn get_space_owner(&self, space: String) -> Result<Option<OutPoint>, ErrorObjectOwned>;
104104

105+
#[method(name = "getspaceout")]
106+
async fn get_spaceout(&self, outpoint: OutPoint) -> Result<Option<SpaceOut>, ErrorObjectOwned>;
107+
105108
#[method(name = "estimatebid")]
106109
async fn estimate_bid(&self, target: usize) -> Result<u64, ErrorObjectOwned>;
107110

108111
#[method(name = "getrollout")]
109112
async fn get_rollout(&self, target: usize) -> Result<Vec<(u32, SpaceHash)>, ErrorObjectOwned>;
110113

111-
#[method(name = "getspaceout")]
112-
async fn get_spaceout(&self, outpoint: OutPoint) -> Result<Option<SpaceOut>, ErrorObjectOwned>;
113-
114114
#[method(name = "getblockdata")]
115115
async fn get_block_data(
116116
&self,
@@ -628,24 +628,6 @@ impl RpcServer for RpcServerImpl {
628628
Ok(info)
629629
}
630630

631-
async fn estimate_bid(&self, target: usize) -> Result<u64, ErrorObjectOwned> {
632-
let info = self
633-
.store
634-
.estimate_bid(target)
635-
.await
636-
.map_err(|error| ErrorObjectOwned::owned(-1, error.to_string(), None::<String>))?;
637-
Ok(info)
638-
}
639-
640-
async fn get_rollout(&self, target: usize) -> Result<Vec<(u32, SpaceHash)>, ErrorObjectOwned> {
641-
let rollouts = self
642-
.store
643-
.get_rollout(target)
644-
.await
645-
.map_err(|error| ErrorObjectOwned::owned(-1, error.to_string(), None::<String>))?;
646-
Ok(rollouts)
647-
}
648-
649631
async fn get_space_owner(&self, space: String) -> Result<Option<OutPoint>, ErrorObjectOwned> {
650632
let space = SName::from_str(&space).map_err(|_| {
651633
ErrorObjectOwned::owned(
@@ -674,6 +656,24 @@ impl RpcServer for RpcServerImpl {
674656
Ok(spaceout)
675657
}
676658

659+
async fn estimate_bid(&self, target: usize) -> Result<u64, ErrorObjectOwned> {
660+
let info = self
661+
.store
662+
.estimate_bid(target)
663+
.await
664+
.map_err(|error| ErrorObjectOwned::owned(-1, error.to_string(), None::<String>))?;
665+
Ok(info)
666+
}
667+
668+
async fn get_rollout(&self, target: usize) -> Result<Vec<(u32, SpaceHash)>, ErrorObjectOwned> {
669+
let rollouts = self
670+
.store
671+
.get_rollout(target)
672+
.await
673+
.map_err(|error| ErrorObjectOwned::owned(-1, error.to_string(), None::<String>))?;
674+
Ok(rollouts)
675+
}
676+
677677
async fn get_block_data(
678678
&self,
679679
block_hash: BlockHash,

0 commit comments

Comments
 (0)