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:
Luke Parker
2023-10-14 02:47:58 -04:00
parent 96cc5d0157
commit cb61c9052a
13 changed files with 384 additions and 365 deletions

View File

@@ -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;