Skip to content

Commit 2b0ef7a

Browse files
committed
[consensus] parallelize verify opt proposal
1 parent 1e50970 commit 2b0ef7a

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

consensus/consensus-types/src/opt_proposal_msg.rs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,16 @@ impl OptProposalMsg {
108108
sender
109109
);
110110

111-
self.block_data()
112-
.payload()
113-
.verify(validator, proof_cache, quorum_store_enabled)?;
114-
115-
self.block_data().grandparent_qc().verify(validator)?;
111+
let (payload_verify_result, qc_verify_result) = rayon::join(
112+
|| {
113+
self.block_data()
114+
.payload()
115+
.verify(validator, proof_cache, quorum_store_enabled)
116+
},
117+
|| self.block_data().grandparent_qc().verify(validator),
118+
);
119+
payload_verify_result?;
120+
qc_verify_result?;
116121

117122
// Note that we postpone the verification of SyncInfo until it's being used.
118123
self.block_data.verify_well_formed()

0 commit comments

Comments
 (0)