This repository was archived by the owner on Nov 6, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
ethcore/src/engines/tendermint Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -451,12 +451,12 @@ impl Engine<EthereumMachine> for Tendermint {
451451
452452 /// Additional engine-specific information for the user/developer concerning `header`.
453453 fn extra_info ( & self , header : & Header ) -> BTreeMap < String , String > {
454- let message = ConsensusMessage :: new_proposal ( header) . expect ( "Invalid header." ) ;
454+ let view = consensus_view ( header) . expect ( "Invalid header view." ) ;
455+ let height = header. number ( ) as Height ;
455456 map ! [
456- "signature" . into( ) => message. signature. to_string( ) ,
457- "height" . into( ) => message. vote_step. height. to_string( ) ,
458- "view" . into( ) => message. vote_step. view. to_string( ) ,
459- "block_hash" . into( ) => message. block_hash. as_ref( ) . map( ToString :: to_string) . unwrap_or( "" . into( ) )
457+ "height" . into( ) => height. to_string( ) ,
458+ "view" . into( ) => view. to_string( ) ,
459+ "block_hash" . into( ) => header. bare_hash( ) . to_string( )
460460 ]
461461 }
462462
@@ -945,6 +945,8 @@ mod tests {
945945 seal[ 2 ] = :: rlp:: encode_list ( & vec ! [ H520 :: from( signature1. clone( ) ) , H520 :: from( signature0. clone( ) ) ] ) . into_vec ( ) ;
946946 header. set_seal ( seal. clone ( ) ) ;
947947
948+ engine. extra_info ( & header) ;
949+
948950 assert ! ( engine. verify_block_external( & header) . is_ok( ) ) ;
949951
950952 let bad_voter = insert_and_unlock ( & tap, "101" ) ;
You can’t perform that action at this time.
0 commit comments