Skip to content

Commit

Permalink
chore: add finalize_snapshot to Application trait
Browse files Browse the repository at this point in the history
  • Loading branch information
lklimek committed Jan 15, 2025
1 parent bcc2907 commit efaf059
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions abci/src/application.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,13 @@ pub trait Application {
Ok(Default::default())
}

fn finalize_snapshot(
&self,
_request: abci::RequestFinalizeSnapshot,
) -> Result<abci::ResponseFinalizeSnapshot, abci::ResponseException> {
Ok(Default::default())
}

fn extend_vote(
&self,
_request: abci::RequestExtendVote,
Expand Down Expand Up @@ -169,6 +176,7 @@ impl<A: Application> RequestDispatcher for A {
request::Value::ApplySnapshotChunk(req) => {
self.apply_snapshot_chunk(req).map(|v| v.into())
},
request::Value::FinalizeSnapshot(req) => self.finalize_snapshot(req).map(|v| v.into()),
request::Value::ListSnapshots(req) => self.list_snapshots(req).map(|v| v.into()),
request::Value::PrepareProposal(req) => self.prepare_proposal(req).map(|v| v.into()),
request::Value::ProcessProposal(req) => self.process_proposal(req).map(|v| v.into()),
Expand Down
1 change: 1 addition & 0 deletions abci/src/tracing_span.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ fn abci_method_name(request: &Value) -> String {
Value::InitChain(_) => "InitChain",
Value::ListSnapshots(_) => "ListSnapshots",
Value::LoadSnapshotChunk(_) => "LoadSnapshotChunk",
Value::FinalizeSnapshot(_) => "FinalizeSnapshot",
Value::OfferSnapshot(_) => "OfferSnapshot",
Value::PrepareProposal(_) => "PrepareProposal",
Value::ProcessProposal(_) => "ProcessProposal",
Expand Down

0 comments on commit efaf059

Please sign in to comment.