@@ -14,16 +14,16 @@ use witnet_data_structures::{
14
14
Block , CheckpointBeacon , Epoch , Hashable , InventoryEntry , InventoryItem , SuperBlock ,
15
15
SuperBlockVote ,
16
16
} ,
17
- proto:: ProtobufConvert ,
17
+ proto:: versioning :: Versioned ,
18
18
transaction:: Transaction ,
19
19
types:: {
20
20
Address , Command , InventoryAnnouncement , InventoryRequest , LastBeacon ,
21
21
Message as WitnetMessage , Peers , Version ,
22
22
} ,
23
23
} ;
24
24
use witnet_p2p:: sessions:: { SessionStatus , SessionType } ;
25
+ use witnet_util:: timestamp:: get_timestamp;
25
26
26
- use super :: Session ;
27
27
use crate :: actors:: {
28
28
chain_manager:: ChainManager ,
29
29
inventory_manager:: InventoryManager ,
@@ -39,7 +39,7 @@ use crate::actors::{
39
39
sessions_manager:: SessionsManager ,
40
40
} ;
41
41
42
- use witnet_util :: timestamp :: get_timestamp ;
42
+ use super :: Session ;
43
43
44
44
#[ derive( Debug , Eq , Fail , PartialEq ) ]
45
45
enum HandshakeError {
@@ -133,7 +133,7 @@ impl StreamHandler<Result<BytesMut, Error>> for Session {
133
133
}
134
134
135
135
let bytes = res. unwrap ( ) ;
136
- let result = WitnetMessage :: from_pb_bytes ( & bytes) ;
136
+ let result = WitnetMessage :: from_versioned_pb_bytes ( & bytes) ;
137
137
138
138
match result {
139
139
Err ( err) => {
@@ -1105,9 +1105,10 @@ fn process_superblock_vote(_session: &mut Session, superblock_vote: SuperBlockVo
1105
1105
1106
1106
#[ cfg( test) ]
1107
1107
mod tests {
1108
- use super :: * ;
1109
1108
use witnet_data_structures:: chain:: Hash ;
1110
1109
1110
+ use super :: * ;
1111
+
1111
1112
#[ test]
1112
1113
fn handshake_bootstrap_before_epoch_zero ( ) {
1113
1114
// Check that when the last beacon has epoch 0 and the current epoch is not 0,
0 commit comments