feat(network): add an extra ergonomic method for n2c chainsync (#439)
This commit is contained in:
parent
9e7cafbcac
commit
a1e18833d6
2 changed files with 15 additions and 1 deletions
|
|
@ -96,7 +96,7 @@ async fn do_chainsync(client: &mut NodeClient) {
|
|||
info!("intersected point is {:?}", point);
|
||||
|
||||
loop {
|
||||
let next = client.chainsync().request_next().await.unwrap();
|
||||
let next = client.chainsync().request_or_await_next().await.unwrap();
|
||||
match next {
|
||||
chainsync::NextResponse::RollForward(h, _) => {
|
||||
let block_number = MultiEraBlock::decode(&h).unwrap().number();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue