Skip to content

Commit ab951cf

Browse files
committed
fix build
1 parent 24857fb commit ab951cf

File tree

9 files changed

+28
-10
lines changed

9 files changed

+28
-10
lines changed

src/jormungandr/jormungandr/src/blockchain/candidate.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,10 @@ mod chain_landing {
7878
stream,
7979
} = state;
8080

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)))?;
8285

8386
match pre_checked {
8487
PreCheckedHeader::AlreadyPresent { .. } => {

src/jormungandr/jormungandr/src/blockchain/tip.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ impl TipUpdater {
9393
while let Some(block) = stream.next().await {
9494
let block = block?;
9595
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))?;
9798
}
9899

99100
self.blockchain
@@ -116,7 +117,8 @@ impl TipUpdater {
116117
.put_tag(MAIN_BRANCH_TAG, candidate_hash)?;
117118

118119
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))?;
120122

121123
self.tip.update_ref(candidate).await;
122124
Ok(())

src/jormungandr/jormungandr/src/rest/v0/logic.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,12 @@ pub async fn post_message(
164164
fail_fast: true,
165165
reply_handle,
166166
};
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)))?;
168173
let reply = reply_future.await?;
169174
if reply.is_error() {
170175
Err(Error::Fragment(reply))

src/jormungandr/jormungandr/src/rest/v1/logic.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,9 @@ pub async fn post_fragments(
103103
fail_fast: batch.fail_fast,
104104
reply_handle,
105105
};
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)))?;
107109
let reply = reply_future.await?;
108110
if reply.is_error() {
109111
Err(Error::Fragments(reply))

src/jormungandr/testing/mjolnir/src/mjolnir_lib/bootstrap/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ impl ClientLoadCommand {
6060

6161
let config = self.build_config();
6262

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)))
6466
}
6567

6668
fn get_block0_hash(&self) -> Hash {

src/jormungandr/testing/mjolnir/src/mjolnir_lib/fragment/batch/adversary/votes_only.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ impl VotesOnly {
8080
Some(self.faucet_spending_counter.into()),
8181
Discrimination::from_testing_bool(self.testing),
8282
);
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)))?;
8485
let vote_plans = block0.vote_plans();
8586

8687
let remote_jormungandr = RemoteJormungandrBuilder::new("node".to_owned())

src/jormungandr/testing/mjolnir/src/mjolnir_lib/fragment/standard/adversary/votes_only.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ impl VotesOnly {
8080
Some(self.faucet_spending_counter.into()),
8181
Discrimination::from_testing_bool(self.testing),
8282
);
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)))?;
8485
let vote_plans = block0.vote_plans();
8586

8687
let remote_jormungandr = RemoteJormungandrBuilder::new("node".to_owned())

src/vit-testing/vitup/src/cli/diff.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ impl DiffCommand {
4646

4747
let remote_genesis_yaml = remote.path().join("genesis_remote.yaml");
4848

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)))?;
5051

5152
let local_genesis_content = read_file(&local_genesis_yaml)?;
5253
let remote_genesis_content = read_file(remote_genesis_yaml)?;

src/vit-testing/vitup/src/cli/generate/snapshot.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,8 @@ impl SnapshotCommandArgs {
125125
}
126126

127127
// 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)))?;
129130

130131
let initials: Vec<Initial> = config
131132
.initial

0 commit comments

Comments
 (0)