@@ -18,7 +18,8 @@ use std::fmt;
18
18
use std:: sync:: Arc ;
19
19
use std:: time:: { Duration , Instant } ;
20
20
21
- use codec:: Encode ;
21
+ use log:: { debug, warn, info} ;
22
+ use parity_codec:: Encode ;
22
23
use futures:: prelude:: * ;
23
24
use tokio:: timer:: Delay ;
24
25
@@ -38,10 +39,10 @@ use crate::{
38
39
AUTHORITY_SET_KEY , CONSENSUS_CHANGES_KEY , LAST_COMPLETED_KEY ,
39
40
Commit , Config , Error , Network , Precommit , Prevote , LastCompleted ,
40
41
} ;
41
- use authorities:: { AuthoritySet , SharedAuthoritySet } ;
42
- use consensus_changes:: SharedConsensusChanges ;
43
- use justification:: GrandpaJustification ;
44
- use until_imported:: UntilVoteTargetImported ;
42
+ use crate :: authorities:: { AuthoritySet , SharedAuthoritySet } ;
43
+ use crate :: consensus_changes:: SharedConsensusChanges ;
44
+ use crate :: justification:: GrandpaJustification ;
45
+ use crate :: until_imported:: UntilVoteTargetImported ;
45
46
46
47
/// The environment we run GRANDPA in.
47
48
pub ( crate ) struct Environment < B , E , Block : BlockT , N : Network < Block > , RA > {
@@ -246,7 +247,7 @@ impl<B, E, Block: BlockT<Hash=H256>, N, RA> voter::Environment<Block::Hash, Numb
246
247
let prevote_timer = Delay :: new ( now + self . config . gossip_duration * 2 ) ;
247
248
let precommit_timer = Delay :: new ( now + self . config . gossip_duration * 4 ) ;
248
249
249
- let incoming = :: communication:: checked_message_stream :: < Block , _ > (
250
+ let incoming = crate :: communication:: checked_message_stream :: < Block , _ > (
250
251
round,
251
252
self . set_id ,
252
253
self . network . messages_for ( round, self . set_id ) ,
@@ -256,7 +257,7 @@ impl<B, E, Block: BlockT<Hash=H256>, N, RA> voter::Environment<Block::Hash, Numb
256
257
let local_key = self . config . local_key . as_ref ( )
257
258
. filter ( |pair| self . voters . contains_key ( & pair. public ( ) . into ( ) ) ) ;
258
259
259
- let ( out_rx, outgoing) = :: communication:: outgoing_messages :: < Block , _ > (
260
+ let ( out_rx, outgoing) = crate :: communication:: outgoing_messages :: < Block , _ > (
260
261
round,
261
262
self . set_id ,
262
263
local_key. cloned ( ) ,
0 commit comments