mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 12:19:24 +00:00
Reorganize serai-client
Instead of functions taking a block hash, has a scope to a block hash before functions can be called. Separates functions by pallets.
This commit is contained in:
@@ -11,11 +11,11 @@ serai_test!(
|
||||
async fn time() {
|
||||
let serai = serai().await;
|
||||
|
||||
let mut number = serai.get_latest_block().await.unwrap().number();
|
||||
let mut number = serai.latest_block().await.unwrap().number();
|
||||
let mut done = 0;
|
||||
while done < 3 {
|
||||
// Wait for the next block
|
||||
let block = serai.get_latest_block().await.unwrap();
|
||||
let block = serai.latest_block().await.unwrap();
|
||||
if block.number() == number {
|
||||
sleep(Duration::from_secs(1)).await;
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user