Skip to content

Commit

Permalink
Merge branch 'refactor-syncer' into integrate-cert
Browse files Browse the repository at this point in the history
  • Loading branch information
cryptoAtwill authored Nov 28, 2024
2 parents 6094356 + 7434eba commit 427bfe5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions fendermint/vm/topdown/src/observation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ impl LinearizedParentBlockView {
self.cumulative_effects_comm.as_slice(),
to_append.as_slice(),
]
.concat();
.concat();
let cid = Cid::new_v1(DAG_CBOR, Code::Blake2b256.digest(&bytes));
self.cumulative_effects_comm = cid.to_bytes();
}
Expand Down Expand Up @@ -264,4 +264,4 @@ impl LinearizedParentBlockView {
self.cumulative_effects_comm,
))
}
}
}
18 changes: 9 additions & 9 deletions fendermint/vm/topdown/src/syncer/poll.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ pub struct ParentPoll<P, S> {

#[async_trait]
impl<P, S> ParentPoller for ParentPoll<P, S>
where
S: ParentViewStore + Send + Sync + 'static + Clone,
P: Send + Sync + 'static + ParentQueryProxy,
where
S: ParentViewStore + Send + Sync + 'static + Clone,
P: Send + Sync + 'static + ParentQueryProxy,
{
type Store = S;

Expand Down Expand Up @@ -118,9 +118,9 @@ where
}

impl<P, S> ParentPoll<P, S>
where
S: ParentViewStore + Send + Sync + 'static,
P: Send + Sync + 'static + ParentQueryProxy,
where
S: ParentViewStore + Send + Sync + 'static,
P: Send + Sync + 'static + ParentQueryProxy,
{
pub fn new(config: ParentSyncerConfig, proxy: P, store: S, last_finalized: Checkpoint) -> Self {
let (tx, _) = broadcast::channel(config.broadcast_channel_size);
Expand Down Expand Up @@ -273,8 +273,8 @@ async fn fetch_data<P>(
height: BlockHeight,
block_hash: BlockHash,
) -> Result<ParentBlockView, Error>
where
P: ParentQueryProxy + Send + Sync + 'static,
where
P: ParentQueryProxy + Send + Sync + 'static,
{
let changes_res = parent_proxy
.get_validator_changes(height)
Expand Down Expand Up @@ -313,4 +313,4 @@ where
topdown_msgs_res.value,
changes_res.value,
))
}
}
2 changes: 1 addition & 1 deletion fendermint/vm/topdown/src/syncer/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,4 @@ impl ParentViewStore for InMemoryParentViewStore {
let inner = self.inner.read().unwrap();
Ok(inner.upper_bound())
}
}
}

0 comments on commit 427bfe5

Please sign in to comment.