mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 19:51:02 +00:00
Update jsonrpsee reference (#1049)
* update jsonrpsee * test * Revert "test" This reverts commit 2b69652ab92ff0d9649088c76faed2c94384540d.
This commit is contained in:
committed by
Bastian Köcher
parent
4e18bff37c
commit
6103fbe40b
@@ -108,12 +108,18 @@ async fn prepare_initialization_data<SourceChain: Chain>(
|
||||
.map_err(|err| format!("Failed to subscribe to {} justifications: {:?}", SourceChain::NAME, err))?;
|
||||
|
||||
// Read next justification - the header that it finalizes will be used as initial header.
|
||||
let justification = justifications.next().await.ok_or_else(|| {
|
||||
format!(
|
||||
"Failed to read {} justification from the stream: stream has ended unexpectedly",
|
||||
SourceChain::NAME,
|
||||
)
|
||||
})?;
|
||||
let justification = justifications
|
||||
.next()
|
||||
.await
|
||||
.map_err(|err| err.to_string())
|
||||
.and_then(|justification| justification.ok_or_else(|| "stream has ended unexpectedly".into()))
|
||||
.map_err(|err| {
|
||||
format!(
|
||||
"Failed to read {} justification from the stream: {}",
|
||||
SourceChain::NAME,
|
||||
err,
|
||||
)
|
||||
})?;
|
||||
|
||||
// Read initial header.
|
||||
let justification: GrandpaJustification<SourceChain::Header> = Decode::decode(&mut &justification.0[..])
|
||||
|
||||
Reference in New Issue
Block a user