@@ -102,15 +102,15 @@ pub trait Rpc {
102
102
#[ method( name = "getspaceowner" ) ]
103
103
async fn get_space_owner ( & self , space : String ) -> Result < Option < OutPoint > , ErrorObjectOwned > ;
104
104
105
+ #[ method( name = "getspaceout" ) ]
106
+ async fn get_spaceout ( & self , outpoint : OutPoint ) -> Result < Option < SpaceOut > , ErrorObjectOwned > ;
107
+
105
108
#[ method( name = "estimatebid" ) ]
106
109
async fn estimate_bid ( & self , target : usize ) -> Result < u64 , ErrorObjectOwned > ;
107
110
108
111
#[ method( name = "getrollout" ) ]
109
112
async fn get_rollout ( & self , target : usize ) -> Result < Vec < ( u32 , SpaceHash ) > , ErrorObjectOwned > ;
110
113
111
- #[ method( name = "getspaceout" ) ]
112
- async fn get_spaceout ( & self , outpoint : OutPoint ) -> Result < Option < SpaceOut > , ErrorObjectOwned > ;
113
-
114
114
#[ method( name = "getblockdata" ) ]
115
115
async fn get_block_data (
116
116
& self ,
@@ -628,24 +628,6 @@ impl RpcServer for RpcServerImpl {
628
628
Ok ( info)
629
629
}
630
630
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
-
649
631
async fn get_space_owner ( & self , space : String ) -> Result < Option < OutPoint > , ErrorObjectOwned > {
650
632
let space = SName :: from_str ( & space) . map_err ( |_| {
651
633
ErrorObjectOwned :: owned (
@@ -674,6 +656,24 @@ impl RpcServer for RpcServerImpl {
674
656
Ok ( spaceout)
675
657
}
676
658
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
+
677
677
async fn get_block_data (
678
678
& self ,
679
679
block_hash : BlockHash ,
0 commit comments