@@ -154,7 +154,7 @@ impl ValidatorBlockInfoStage {
154154 pub fn verify_proposal_commitment (
155155 self ,
156156 proposal_commitment : & p2p_proto:: consensus:: ProposalCommitment ,
157- ) -> anyhow:: Result < ValidatorEmptyProposalStage > {
157+ ) -> anyhow:: Result < ValidatorFinalizeStage > {
158158 if proposal_commitment. state_diff_commitment != Hash :: ZERO {
159159 return Err ( anyhow:: anyhow!(
160160 "Empty proposal commitment should have zero state_diff_commitment, got: {}" ,
@@ -250,36 +250,13 @@ impl ValidatorBlockInfoStage {
250250 state_diff_commitment : StateDiffCommitment :: ZERO ,
251251 state_diff_length : 0 ,
252252 } ;
253- Ok ( ValidatorEmptyProposalStage {
254- expected_block_header,
255- } )
256- }
257- }
258-
259- /// An empty proposal contains the following: Init, Commitment, Fin. This
260- /// stage occurs after the ValidatorBlockInfoStage ingests the Commitment and is
261- /// specific only to the empty proposal path.
262- pub struct ValidatorEmptyProposalStage {
263- expected_block_header : BlockHeader ,
264- }
265-
266- impl ValidatorEmptyProposalStage {
267- /// Finalizes the empty proposal, producing a header with all commitments
268- /// except the state commitment and block hash, which are computed in the
269- /// last stage. Also verifies that the computed proposal commitment matches
270- /// the expected one.
271- pub fn consensus_finalize ( self ) -> ValidatorFinalizeStage {
272- let Self {
273- expected_block_header,
274- } = self ;
275-
276- ValidatorFinalizeStage {
253+ Ok ( ValidatorFinalizeStage {
277254 header : expected_block_header,
278255 state_update : StateUpdateData :: default ( ) ,
279256 transactions : Vec :: new ( ) ,
280257 receipts : Vec :: new ( ) ,
281258 events : Vec :: new ( ) ,
282- }
259+ } )
283260 }
284261}
285262
0 commit comments