mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 13:21:01 +00:00
Fix inconsistent head_data (#18)
* fix * Update consensus/src/lib.rs Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
committed by
Bastian Köcher
parent
d3ed1df0ea
commit
712a2a1580
@@ -98,10 +98,9 @@ pub fn follow_polkadot<L, P>(para_id: ParaId, local: Arc<L>, polkadot: P)
|
|||||||
|
|
||||||
finalized_heads
|
finalized_heads
|
||||||
.map(|head_data| {
|
.map(|head_data| {
|
||||||
<Option<<L::Block as BlockT>::Header>>::decode(&mut &head_data[..])
|
<<L::Block as BlockT>::Header>::decode(&mut &head_data[..])
|
||||||
.map_err(|_| Error::InvalidHeadData)
|
.map_err(|_| Error::InvalidHeadData)
|
||||||
})
|
})
|
||||||
.try_filter_map(|h| future::ready(Ok(h)))
|
|
||||||
.try_for_each(move |p_head| {
|
.try_for_each(move |p_head| {
|
||||||
future::ready(local.finalize(p_head.hash()).map_err(Error::Client).map(|_| ()))
|
future::ready(local.finalize(p_head.hash()).map_err(Error::Client).map(|_| ()))
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user