File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -63,12 +63,14 @@ fn match_rule(
63
63
session : & Session ,
64
64
uid : & ValidatorId ,
65
65
) -> bool {
66
- let ( ev_type, publisher) = match ( & rule. ev_type , & rule. publisher ) {
67
- ( Some ( event_types) , Some ( publishers) ) => (
68
- event_types. contains ( & ev_type. to_string ( ) ) ,
69
- publishers. contains ( & uid) ,
70
- ) ,
71
- _ => ( true , true ) ,
66
+ let ev_type = match & rule. ev_type {
67
+ Some ( event_types) => event_types. contains ( & ev_type. to_string ( ) ) ,
68
+ _ => true ,
69
+ } ;
70
+
71
+ let publisher = match & rule. publisher {
72
+ Some ( publishers) => publishers. contains ( & uid) ,
73
+ _ => true ,
72
74
} ;
73
75
74
76
let os_type = match ( & rule. os_type , & session. os ) {
@@ -219,7 +221,9 @@ mod tests {
219
221
} ;
220
222
221
223
cases. iter ( ) . for_each ( |( event, expected_result, message) | {
224
+ println ! ( "payout {}" , expected_result. to_string( ) ) ;
222
225
let payout = get_payout ( & channel, & event, & session) ;
226
+ println ! ( "payout {}" , payout. to_string( ) ) ;
223
227
assert ! ( & payout == expected_result, message. clone( ) ) ;
224
228
} )
225
229
}
You can’t perform that action at this time.
0 commit comments