File tree Expand file tree Collapse file tree 9 files changed +28
-10
lines changed
testing/mjolnir/src/mjolnir_lib
vit-testing/vitup/src/cli Expand file tree Collapse file tree 9 files changed +28
-10
lines changed Original file line number Diff line number Diff line change @@ -78,7 +78,10 @@ mod chain_landing {
78
78
stream,
79
79
} = state;
80
80
81
- let pre_checked = blockchain. pre_check_header ( header, false ) . await . map_err ( |e| Error :: Blockchain ( Box :: new ( e) ) ) ?;
81
+ let pre_checked = blockchain
82
+ . pre_check_header ( header, false )
83
+ . await
84
+ . map_err ( |e| Error :: Blockchain ( Box :: new ( e) ) ) ?;
82
85
83
86
match pre_checked {
84
87
PreCheckedHeader :: AlreadyPresent { .. } => {
Original file line number Diff line number Diff line change @@ -93,7 +93,8 @@ impl TipUpdater {
93
93
while let Some ( block) = stream. next ( ) . await {
94
94
let block = block?;
95
95
let fragment_ids = block. fragments ( ) . map ( |f| f. id ( ) ) . collect ( ) ;
96
- self . try_request_fragment_removal ( fragment_ids, block. header ( ) ) . map_err ( |e| Error :: from ( * e) ) ?;
96
+ self . try_request_fragment_removal ( fragment_ids, block. header ( ) )
97
+ . map_err ( |e| Error :: from ( * e) ) ?;
97
98
}
98
99
99
100
self . blockchain
@@ -116,7 +117,8 @@ impl TipUpdater {
116
117
. put_tag ( MAIN_BRANCH_TAG , candidate_hash) ?;
117
118
118
119
let fragment_ids = block. fragments ( ) . map ( |f| f. id ( ) ) . collect ( ) ;
119
- self . try_request_fragment_removal ( fragment_ids, block. header ( ) ) . map_err ( |e| Error :: from ( * e) ) ?;
120
+ self . try_request_fragment_removal ( fragment_ids, block. header ( ) )
121
+ . map_err ( |e| Error :: from ( * e) ) ?;
120
122
121
123
self . tip . update_ref ( candidate) . await ;
122
124
Ok ( ( ) )
Original file line number Diff line number Diff line change @@ -164,7 +164,12 @@ pub async fn post_message(
164
164
fail_fast : true ,
165
165
reply_handle,
166
166
} ;
167
- context. try_full ( ) ?. transaction_task . clone ( ) . try_send ( msg) . map_err ( |e| Error :: TxMsgSendError ( Box :: new ( e) ) ) ?;
167
+ context
168
+ . try_full ( ) ?
169
+ . transaction_task
170
+ . clone ( )
171
+ . try_send ( msg)
172
+ . map_err ( |e| Error :: TxMsgSendError ( Box :: new ( e) ) ) ?;
168
173
let reply = reply_future. await ?;
169
174
if reply. is_error ( ) {
170
175
Err ( Error :: Fragment ( reply) )
Original file line number Diff line number Diff line change @@ -103,7 +103,9 @@ pub async fn post_fragments(
103
103
fail_fast : batch. fail_fast ,
104
104
reply_handle,
105
105
} ;
106
- msgbox. try_send ( msg) . map_err ( |e| Error :: TxMsgSend ( Box :: new ( e) ) ) ?;
106
+ msgbox
107
+ . try_send ( msg)
108
+ . map_err ( |e| Error :: TxMsgSend ( Box :: new ( e) ) ) ?;
107
109
let reply = reply_future. await ?;
108
110
if reply. is_error ( ) {
109
111
Err ( Error :: Fragments ( reply) )
Original file line number Diff line number Diff line change @@ -60,7 +60,9 @@ impl ClientLoadCommand {
60
60
61
61
let config = self . build_config ( ) ;
62
62
63
- PassiveBootstrapLoad :: new ( config) . exec ( scenario_type. unwrap ( ) ) . map_err ( |e| ClientLoadCommandError :: ClientError ( Box :: new ( e) ) )
63
+ PassiveBootstrapLoad :: new ( config)
64
+ . exec ( scenario_type. unwrap ( ) )
65
+ . map_err ( |e| ClientLoadCommandError :: ClientError ( Box :: new ( e) ) )
64
66
}
65
67
66
68
fn get_block0_hash ( & self ) -> Hash {
Original file line number Diff line number Diff line change @@ -80,7 +80,8 @@ impl VotesOnly {
80
80
Some ( self . faucet_spending_counter . into ( ) ) ,
81
81
Discrimination :: from_testing_bool ( self . testing ) ,
82
82
) ;
83
- let block0 = get_block ( & self . block0_path ) . map_err ( |e| MjolnirError :: Block0Error ( Box :: new ( e) ) ) ?;
83
+ let block0 =
84
+ get_block ( & self . block0_path ) . map_err ( |e| MjolnirError :: Block0Error ( Box :: new ( e) ) ) ?;
84
85
let vote_plans = block0. vote_plans ( ) ;
85
86
86
87
let remote_jormungandr = RemoteJormungandrBuilder :: new ( "node" . to_owned ( ) )
Original file line number Diff line number Diff line change @@ -80,7 +80,8 @@ impl VotesOnly {
80
80
Some ( self . faucet_spending_counter . into ( ) ) ,
81
81
Discrimination :: from_testing_bool ( self . testing ) ,
82
82
) ;
83
- let block0 = get_block ( & self . block0_path ) . map_err ( |e| MjolnirError :: Block0Error ( Box :: new ( e) ) ) ?;
83
+ let block0 =
84
+ get_block ( & self . block0_path ) . map_err ( |e| MjolnirError :: Block0Error ( Box :: new ( e) ) ) ?;
84
85
let vote_plans = block0. vote_plans ( ) ;
85
86
86
87
let remote_jormungandr = RemoteJormungandrBuilder :: new ( "node" . to_owned ( ) )
Original file line number Diff line number Diff line change @@ -46,7 +46,8 @@ impl DiffCommand {
46
46
47
47
let remote_genesis_yaml = remote. path ( ) . join ( "genesis_remote.yaml" ) ;
48
48
49
- decode_block0 ( remote_client. block0 ( ) ?, remote_genesis_yaml. clone ( ) ) . map_err ( |e| crate :: error:: Error :: Block0Error ( Box :: new ( e) ) ) ?;
49
+ decode_block0 ( remote_client. block0 ( ) ?, remote_genesis_yaml. clone ( ) )
50
+ . map_err ( |e| crate :: error:: Error :: Block0Error ( Box :: new ( e) ) ) ?;
50
51
51
52
let local_genesis_content = read_file ( & local_genesis_yaml) ?;
52
53
let remote_genesis_content = read_file ( remote_genesis_yaml) ?;
Original file line number Diff line number Diff line change @@ -125,7 +125,8 @@ impl SnapshotCommandArgs {
125
125
}
126
126
127
127
// write snapshot.json
128
- let config = read_genesis_yaml ( & genesis_yaml) . map_err ( |e| crate :: error:: Error :: Block0Error ( Box :: new ( e) ) ) ?;
128
+ let config = read_genesis_yaml ( & genesis_yaml)
129
+ . map_err ( |e| crate :: error:: Error :: Block0Error ( Box :: new ( e) ) ) ?;
129
130
130
131
let initials: Vec < Initial > = config
131
132
. initial
You can’t perform that action at this time.
0 commit comments