Skip to content

Commit

Permalink
Remove unused Default bound on InstanceState (#734)
Browse files Browse the repository at this point in the history
* Remove unused Default bound on InstanceState

In the sequencer repo we don't have a proper `Default` implentation but
one that's gated behind the testing feature because it wouldn't actually
work.

Working on
EspressoSystems/espresso-sequencer#2283
it seems that this is one of the pain points for removing the spread of
the testing features in the sequencer crates.

It looks like we don't need the trait bound anymore in the query
service.

* CI: run on all pull requests
  • Loading branch information
sveitser authored Nov 15, 2024
1 parent 81e7e97 commit b41a630
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 11 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ on:
- main
- release-*
pull_request:
branches:
- main
- release-*
workflow_dispatch:

jobs:
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ on:
- main
- release-*
pull_request:
branches:
- main
- release-*
workflow_dispatch:

jobs:
Expand Down
6 changes: 1 addition & 5 deletions src/data_source/update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ impl<Types: NodeType, T> UpdateDataSource<Types> for T
where
T: UpdateAvailabilityData<Types> + Send + Sync,
Payload<Types>: QueryablePayload<Types>,
<Types as NodeType>::InstanceState: Default,
{
async fn update(&self, event: &Event<Types>) -> Result<(), u64> {
if let EventType::Decide { leaf_chain, qc, .. } = &event.event {
Expand Down Expand Up @@ -154,10 +153,7 @@ where

fn genesis_vid<Types: NodeType>(
leaf: &Leaf<Types>,
) -> anyhow::Result<(VidCommonQueryData<Types>, VidShare)>
where
<Types as NodeType>::InstanceState: Default,
{
) -> anyhow::Result<(VidCommonQueryData<Types>, VidShare)> {
let payload = Payload::<Types>::empty().0;
let bytes = payload.encode();
let mut disperse = vid_scheme(GENESIS_VID_NUM_STORAGE_NODES)
Expand Down

0 comments on commit b41a630

Please sign in to comment.