Skip to content

Commit a1399d2

Browse files
committed
clean-up & fix tests usage of config
1 parent 96023af commit a1399d2

File tree

13 files changed

+18
-17
lines changed

13 files changed

+18
-17
lines changed

adapter/src/dummy.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ impl Dummy {
5353

5454
/// Set the deposit that you want the adapter to return every time
5555
/// when the [`get_deposit()`](Locked::get_deposit) get's called
56-
/// for the give [`ChannelId`] and [`Address`].
56+
/// for the give [`ChannelId`](primitives::ChannelId) and [`Address`].
5757
///
5858
/// If [`Deposit`] is set to [`None`], it remove the mocked deposit.
5959
///
@@ -281,7 +281,7 @@ mod deposit {
281281
/// Mocked deposits for the Dummy adapter.
282282
///
283283
/// These deposits can be set once and the adapter will return
284-
/// the set deposit on every call to [`get_deposit()`](`Locked::get_deposit`).
284+
/// the set deposit on every call to [`get_deposit()`](crate::client::Locked::get_deposit).
285285
#[derive(Debug, Clone, Default)]
286286
pub struct Deposits(pub Arc<DashMap<Key, Deposit>>);
287287

adapter/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#![deny(rust_2018_idioms)]
22
#![deny(clippy::all)]
3+
#![deny(rustdoc::broken_intra_doc_links)]
34
#![cfg_attr(docsrs, feature(doc_cfg))]
45

56
pub use {

adview-manager/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#![deny(rust_2018_idioms)]
22
#![deny(clippy::all)]
3+
#![deny(rustdoc::broken_intra_doc_links)]
34
#![cfg_attr(docsrs, feature(doc_cfg))]
45

56
use adex_primitives::{

primitives/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#![deny(rust_2018_idioms)]
22
#![deny(clippy::all)]
3+
#![deny(rustdoc::broken_intra_doc_links)]
34
#![cfg_attr(docsrs, feature(doc_cfg))]
45
// TODO: Remove once stabled and upstream num::Integer::div_floor(...) is fixed
56
#![allow(unstable_name_collisions)]

sentry/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
#![deny(clippy::all)]
21
#![deny(rust_2018_idioms)]
2+
#![deny(clippy::all)]
3+
#![deny(rustdoc::broken_intra_doc_links)]
34
#![cfg_attr(docsrs, feature(doc_cfg))]
45

56
#[doc(inline)]

sentry/src/routes/channel.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ pub async fn channel_payout<C: Locked + 'static>(
557557

558558
/// POST `/v5/channel/dummy-deposit` request
559559
///
560-
/// Request body (json): [`ChannelDummyDeposit`]
560+
/// Body (json): [`ChannelDummyDeposit`]
561561
///
562562
/// Response: [`SuccessResponse`]
563563
pub async fn channel_dummy_deposit<C: Locked + 'static>(

sentry/src/routes/routers.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ pub async fn channels_router<C: Locked + 'static>(
254254
channel_payout(req, app).await
255255
}
256256
// POST /v5/channel/dummy-deposit
257-
// will allow the calling of the method only if we are using the Dummy adapter!
257+
// We allow the calling of the method only if we are using the Dummy adapter!
258258
else if let (Some(caps), &Method::POST, true) = (
259259
CHANNEL_DUMMY_ADAPTER_DEPOSIT.captures(&path),
260260
method,
@@ -265,11 +265,7 @@ pub async fn channels_router<C: Locked + 'static>(
265265
.map_or("".to_string(), |m| m.as_str().to_string())]);
266266
req.extensions_mut().insert(param);
267267

268-
req = Chain::new()
269-
.chain(AuthRequired)
270-
// .chain(ChannelLoad)
271-
.apply(req, app)
272-
.await?;
268+
req = Chain::new().chain(AuthRequired).apply(req, app).await?;
273269

274270
channel_dummy_deposit(req, app).await
275271
} else {

validator_worker/src/follower.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ mod test {
371371
let adapter = Adapter::with_unlocked(Dummy::init(Options {
372372
dummy_identity: IDS[&LEADER],
373373
dummy_auth_tokens: DUMMY_AUTH.clone(),
374-
dummy_chains: GANACHE_CONFIG.chains.values().cloned().collect(),
374+
dummy_chains: config.chains.values().cloned().collect(),
375375
}));
376376
let logger = discard_logger();
377377

validator_worker/src/heartbeat.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ mod test {
128128
let adapter = Adapter::with_unlocked(Dummy::init(Options {
129129
dummy_identity: IDS[&LEADER],
130130
dummy_auth_tokens: DUMMY_AUTH.clone(),
131-
dummy_chains: GANACHE_CONFIG.chains.values().cloned().collect(),
131+
dummy_chains: config.chains.values().cloned().collect(),
132132
}));
133133
let logger = discard_logger();
134134

validator_worker/src/leader.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ mod test {
161161
let adapter = Adapter::with_unlocked(Dummy::init(Options {
162162
dummy_identity: IDS[&LEADER],
163163
dummy_auth_tokens: DUMMY_AUTH.clone(),
164-
dummy_chains: GANACHE_CONFIG.chains.values().cloned().collect(),
164+
dummy_chains: config.chains.values().cloned().collect(),
165165
}));
166166
let logger = discard_logger();
167167

0 commit comments

Comments
 (0)