@@ -62,11 +62,11 @@ impl Client {
62
62
/// Blocks until the sugondat node has finalized a block at the given height. Returns
63
63
/// the block hash of the block at the given height.
64
64
#[ tracing:: instrument( level = Level :: DEBUG , skip( self ) ) ]
65
- pub async fn wait_finalized_height ( & self , height : u64 ) -> [ u8 ; 32 ] {
65
+ pub async fn await_finalized_height ( & self , height : u64 ) -> [ u8 ; 32 ] {
66
66
tracing:: info!( "Waiting for block at height: {}" , height) ;
67
67
loop {
68
68
let conn = self . connector . ensure_connected ( ) . await ;
69
- match conn. finalized . wait_until_finalized ( self , height) . await {
69
+ match conn. finalized . await_finalized ( self , height) . await {
70
70
Some ( block_hash) => return block_hash,
71
71
None => {
72
72
// The watcher task has terminated. Reset the connection and retry.
@@ -111,7 +111,7 @@ impl Client {
111
111
/// Returns the block hash of the block at the given height,
112
112
/// automatically retrying until it succeeds.
113
113
/// `None` indicates the best block.
114
- pub async fn wait_block_hash ( & self , height : u64 ) -> [ u8 ; 32 ] {
114
+ pub async fn await_block_hash ( & self , height : u64 ) -> [ u8 ; 32 ] {
115
115
loop {
116
116
match self . block_hash ( height) . await {
117
117
Ok ( Some ( res) ) => break res,
@@ -155,7 +155,7 @@ impl Client {
155
155
/// Returns the header and the body of the block with the given hash,
156
156
/// automatically retrying until it succeeds.
157
157
/// `None` indicates the best block.
158
- async fn wait_header_and_extrinsics (
158
+ async fn await_header_and_extrinsics (
159
159
& self ,
160
160
block_hash : Option < [ u8 ; 32 ] > ,
161
161
) -> ( Header , Vec < sugondat_subxt:: ExtrinsicDetails > ) {
@@ -189,8 +189,8 @@ impl Client {
189
189
///
190
190
/// `None` indicates that the best block should be used.
191
191
#[ tracing:: instrument( level = Level :: DEBUG , skip( self ) ) ]
192
- pub async fn wait_block_at ( & self , block_hash : Option < [ u8 ; 32 ] > ) -> anyhow:: Result < Block > {
193
- Block :: from_header_and_extrinsics ( self . wait_header_and_extrinsics ( block_hash) . await )
192
+ pub async fn await_block_at ( & self , block_hash : Option < [ u8 ; 32 ] > ) -> anyhow:: Result < Block > {
193
+ Block :: from_header_and_extrinsics ( self . await_header_and_extrinsics ( block_hash) . await )
194
194
}
195
195
196
196
/// Submit a blob with the given namespace and signed with the given key. The block is submitted
@@ -325,7 +325,7 @@ impl FinalizedHeadWatcher {
325
325
326
326
/// Wait until the sugondat node has finalized a block at the given height. Returns the block
327
327
/// hash of that finalized block, or `None` in case the watcher task has terminated.
328
- async fn wait_until_finalized ( & self , client : & Client , height : u64 ) -> Option < [ u8 ; 32 ] > {
328
+ async fn await_finalized ( & self , client : & Client , height : u64 ) -> Option < [ u8 ; 32 ] > {
329
329
let mut rx = self . rx . clone ( ) ;
330
330
let ( finalized_height, block_hash) = loop {
331
331
if let Err ( _) = rx. changed ( ) . await {
0 commit comments