1
- use crate :: validator:: { Heartbeat , MessageTypes } ;
1
+ use crate :: validator:: { ApproveState , Heartbeat , MessageTypes , NewState } ;
2
2
use crate :: { BigNum , Channel } ;
3
3
use chrono:: { DateTime , Utc } ;
4
4
use serde:: { Deserialize , Serialize } ;
@@ -9,9 +9,23 @@ use std::collections::HashMap;
9
9
#[ serde( rename_all = "camelCase" ) ]
10
10
pub struct LastApproved {
11
11
/// NewState can be None if the channel is brand new
12
- pub new_state : Option < ValidatorMessage > ,
12
+ pub new_state : Option < NewStateValidatorMessage > ,
13
13
/// ApproveState can be None if the channel is brand new
14
- pub approved_state : Option < ValidatorMessage > ,
14
+ pub approved_state : Option < ApproveStateValidatorMessage > ,
15
+ }
16
+
17
+ #[ derive( Serialize , Deserialize , Debug ) ]
18
+ pub struct NewStateValidatorMessage {
19
+ pub from : String ,
20
+ pub received : DateTime < Utc > ,
21
+ pub msg : NewState ,
22
+ }
23
+
24
+ #[ derive( Serialize , Deserialize , Debug ) ]
25
+ pub struct ApproveStateValidatorMessage {
26
+ pub from : String ,
27
+ pub received : DateTime < Utc > ,
28
+ pub msg : ApproveState ,
15
29
}
16
30
17
31
#[ serde( tag = "type" , rename_all = "SCREAMING_SNAKE_CASE" ) ]
0 commit comments