File tree Expand file tree Collapse file tree 2 files changed +38
-0
lines changed
core/src/consensus/tendermint Expand file tree Collapse file tree 2 files changed +38
-0
lines changed Original file line number Diff line number Diff line change @@ -466,6 +466,43 @@ mod tests {
466466 } ) ;
467467 }
468468
469+ #[ test]
470+ fn encode_and_decode_tendermint_message_6 ( ) {
471+ rlp_encode_and_decode_test ! ( TendermintMessage :: RequestCommit {
472+ height: 3 ,
473+ } ) ;
474+ }
475+
476+ #[ test]
477+ fn encode_and_decode_tendermint_message_7 ( ) {
478+ rlp_encode_and_decode_test ! ( TendermintMessage :: Commit {
479+ height: 3 ,
480+ block: vec![ 1u8 , 2u8 ] ,
481+ votes: vec![
482+ ConsensusMessage {
483+ signature: SchnorrSignature :: random( ) ,
484+ signer_index: 0x1234 ,
485+ on: VoteOn {
486+ step: VoteStep :: new( 2 , 3 , Step :: Commit ) ,
487+ block_hash: Some ( H256 :: from(
488+ "07feab4c39250abf60b77d7589a5b61fdf409bd837e936376381d19db1e1f050"
489+ ) ) ,
490+ } ,
491+ } ,
492+ ConsensusMessage {
493+ signature: SchnorrSignature :: random( ) ,
494+ signer_index: 0x1235 ,
495+ on: VoteOn {
496+ step: VoteStep :: new( 2 , 3 , Step :: Commit ) ,
497+ block_hash: Some ( H256 :: from(
498+ "07feab4c39250abf60b77d7589a5b61fdf409bd837e936376381d19db1e1f050"
499+ ) ) ,
500+ } ,
501+ }
502+ ]
503+ } ) ;
504+ }
505+
469506 #[ test]
470507 fn encode_and_decode_consensus_message_1 ( ) {
471508 let message = ConsensusMessage :: default ( ) ;
Original file line number Diff line number Diff line change @@ -497,6 +497,7 @@ impl Worker {
497497 self . proposal . is_none ( ) && !self . step . is_commit ( )
498498 }
499499
500+ // FIXME: remove pub
500501 pub fn get_all_votes_and_authors (
501502 & self ,
502503 vote_step : & VoteStep ,
You can’t perform that action at this time.
0 commit comments