Skip to content

Commit

Permalink
Fix inconsistent head_data (#18)
Browse files Browse the repository at this point in the history
* fix

* Update consensus/src/lib.rs

Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>
  • Loading branch information
gui1117 and bkchr committed Oct 22, 2019
1 parent d3ed1df commit 712a2a1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions consensus/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,9 @@ pub fn follow_polkadot<L, P>(para_id: ParaId, local: Arc<L>, polkadot: P)

finalized_heads
.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)
})
.try_filter_map(|h| future::ready(Ok(h)))
.try_for_each(move |p_head| {
future::ready(local.finalize(p_head.hash()).map_err(Error::Client).map(|_| ()))
})
Expand Down

0 comments on commit 712a2a1

Please sign in to comment.