Skip to content

Commit e21723d

Browse files
committed
Merge branch 'aip-61-adex-v5' into v5-validator-workflow
2 parents 7beb97a + 20e123e commit e21723d

File tree

14 files changed

+18
-29
lines changed

14 files changed

+18
-29
lines changed

adapter/src/dummy.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@ use primitives::{
55
Adapter, AdapterErrorKind, AdapterResult, Deposit, DummyAdapterOptions,
66
Error as AdapterError, Session,
77
},
8-
channel::Channel,
98
config::Config,
10-
Address, ChannelId, ToETHChecksum, ValidatorId,
9+
Address, Channel, ChannelId, ToETHChecksum, ValidatorId,
1110
};
1211
use std::{collections::HashMap, fmt, sync::Arc};
1312

adapter/src/ethereum.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@ use ethstore::{
99
use lazy_static::lazy_static;
1010
use primitives::{
1111
adapter::{Adapter, AdapterResult, Deposit, Error as AdapterError, KeystoreOptions, Session},
12-
channel::Channel,
1312
config::Config,
14-
Address, BigNum, ToETHChecksum, ValidatorId,
13+
Address, BigNum, Channel, ToETHChecksum, ValidatorId,
1514
};
1615
use reqwest::Client;
1716
use serde::{Deserialize, Serialize};

primitives/src/campaign.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use crate::{
2-
channel::Channel, targeting::Rules, AdUnit, Address, EventSubmission, UnifiedNum, Validator,
2+
targeting::Rules, AdUnit, Address, Channel, EventSubmission, UnifiedNum, Validator,
33
ValidatorDesc, ValidatorId,
44
};
55

@@ -358,7 +358,7 @@ pub mod validators {
358358

359359
#[cfg(feature = "postgres")]
360360
mod postgres {
361-
use crate::channel::Channel;
361+
use crate::Channel;
362362

363363
use super::{Active, Campaign, CampaignId, PricingBounds, Validators};
364364
use bytes::BytesMut;

primitives/src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ pub use self::{
1111
balances_map::{BalancesMap, UnifiedMap},
1212
big_num::BigNum,
1313
campaign::{Campaign, CampaignId},
14-
channel::Channel,
15-
channel::ChannelId,
14+
channel::{Channel, ChannelId},
1615
config::Config,
1716
deposit::Deposit,
1817
event_submission::EventSubmission,

primitives/src/sentry.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ impl fmt::Display for ChannelReport {
300300
}
301301

302302
pub mod channel_list {
303-
use crate::{channel::Channel, ValidatorId};
303+
use crate::{Channel, ValidatorId};
304304
use serde::{Deserialize, Serialize};
305305

306306
use super::Pagination;
@@ -360,9 +360,8 @@ pub mod campaign_create {
360360

361361
use crate::{
362362
campaign::{prefix_active, Active, PricingBounds, Validators},
363-
channel::Channel,
364363
targeting::Rules,
365-
AdUnit, Address, Campaign, CampaignId, EventSubmission, UnifiedNum,
364+
AdUnit, Address, Campaign, CampaignId, Channel, EventSubmission, UnifiedNum,
366365
};
367366

368367
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]

primitives/src/spender.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::{channel::Channel, Address, Deposit, UnifiedNum};
1+
use crate::{Address, Channel, Deposit, UnifiedNum};
22
use serde::{Deserialize, Serialize};
33

44
#[derive(Serialize, Deserialize, Debug, Clone)]

primitives/src/util/tests/prep_db.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ lazy_static! {
5353

5454
// Dummy adapter auth tokens
5555
// authorization tokens
56-
///
5756
pub static ref AUTH: HashMap<String, String> = {
5857
let mut auth = HashMap::new();
5958

sentry/src/db/channel.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,8 @@ pub async fn insert_validator_messages(
9595

9696
mod list_channels {
9797
use primitives::{
98-
channel::Channel,
9998
sentry::{channel_list::ChannelListResponse, Pagination},
100-
ValidatorId,
99+
Channel, ValidatorId,
101100
};
102101
use std::str::FromStr;
103102
use tokio_postgres::types::{accepts, FromSql, Type};

sentry/src/db/event_aggregate.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@ use chrono::{DateTime, Utc};
22
use futures::pin_mut;
33
use primitives::{
44
balances::UncheckedState,
5-
channel::Channel as ChannelV5,
65
sentry::{EventAggregate, MessageResponse},
76
validator::{ApproveState, Heartbeat, NewState},
8-
Address, BigNum, ChannelId, ValidatorId,
7+
Address, BigNum, Channel, ChannelId, ValidatorId,
98
};
109
use std::{convert::TryFrom, ops::Add};
1110
use tokio_postgres::{
@@ -17,7 +16,7 @@ use super::{DbPool, PoolError};
1716

1817
pub async fn latest_approve_state_v5(
1918
pool: &DbPool,
20-
channel: &ChannelV5,
19+
channel: &Channel,
2120
) -> Result<Option<MessageResponse<ApproveState>>, PoolError> {
2221
let client = pool.get().await?;
2322

@@ -34,7 +33,7 @@ pub async fn latest_approve_state_v5(
3433

3534
pub async fn latest_new_state_v5(
3635
pool: &DbPool,
37-
channel: &ChannelV5,
36+
channel: &Channel,
3837
state_root: &str,
3938
) -> Result<Option<MessageResponse<NewState<UncheckedState>>>, PoolError> {
4039
let client = pool.get().await?;

sentry/src/routes/campaign.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,10 @@ use hyper::{Body, Request, Response};
1313
use primitives::{
1414
adapter::{Adapter, AdapterErrorKind, Error as AdapterError},
1515
campaign_validator::Validator,
16-
channel::Channel,
1716
config::TokenInfo,
1817
sentry::campaign_create::{CreateCampaign, ModifyCampaign},
1918
spender::Spendable,
20-
Address, Campaign, Deposit, UnifiedNum,
19+
Address, Campaign, Channel, Deposit, UnifiedNum,
2120
};
2221
use slog::error;
2322
use std::cmp::{max, Ordering};

sentry/src/routes/event_aggregate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use chrono::{serde::ts_milliseconds_option, DateTime, Utc};
22
use hyper::{Body, Request, Response};
33
use serde::Deserialize;
44

5-
use primitives::{adapter::Adapter, channel::Channel, sentry::EventAggregateResponse};
5+
use primitives::{adapter::Adapter, sentry::EventAggregateResponse, Channel};
66

77
use crate::{success_response, Application, Auth, ResponseError};
88

validator_worker/src/follower.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@ use primitives::{
44
adapter::{Adapter, AdapterErrorKind, Error as AdapterError},
55
balances,
66
balances::{Balances, CheckedState, UncheckedState},
7-
channel::Channel,
87
config::TokenInfo,
98
spender::Spender,
109
validator::{ApproveState, MessageTypes, NewState, RejectState},
11-
Address, ChannelId, UnifiedNum,
10+
Address, Channel, ChannelId, UnifiedNum,
1211
};
1312

1413
use crate::{

validator_worker/src/leader.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@ use thiserror::Error;
44
use primitives::{
55
adapter::{Adapter, AdapterErrorKind, Error as AdapterError},
66
balances::CheckedState,
7-
channel::Channel,
87
config::TokenInfo,
98
validator::{MessageError, MessageTypes, NewState},
10-
Balances, ChannelId,
9+
Balances, Channel, ChannelId,
1110
};
1211

1312
use crate::{

validator_worker/src/sentry_interface.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use primitives::{
1515
spender::Spender,
1616
util::ApiUrl,
1717
validator::MessageTypes,
18-
Address, {ChannelId, Config, ValidatorId},
18+
Address, Campaign, ChannelId, Config, ValidatorId,
1919
};
2020
use thiserror::Error;
2121

@@ -263,10 +263,9 @@ async fn propagate_to<A: Adapter>(
263263
pub mod channels {
264264
use futures::{future::try_join_all, TryFutureExt};
265265
use primitives::{
266-
channel::Channel,
267266
sentry::channel_list::{ChannelListQuery, ChannelListResponse},
268267
util::ApiUrl,
269-
ValidatorId,
268+
Channel, ValidatorId,
270269
};
271270
use reqwest::{Client, Response};
272271

0 commit comments

Comments
 (0)