Skip to content

Commit f5f806a

Browse files
committed
fix: box adapter types
1 parent c65a4ad commit f5f806a

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

adapter/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ pub use self::dummy::DummyAdapter;
2121
pub use self::ethereum::EthereumAdapter;
2222

2323
pub enum AdapterTypes {
24-
DummyAdapter(DummyAdapter),
25-
EthereumAdapter(EthereumAdapter),
24+
DummyAdapter(Box<DummyAdapter>),
25+
EthereumAdapter(Box<EthereumAdapter>),
2626
}
2727

2828
pub fn get_signable_state_root(

validator_worker/src/main.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ fn main() {
7474
dummy_auth: None,
7575
dummy_auth_tokens: None,
7676
};
77-
AdapterTypes::EthereumAdapter(
77+
AdapterTypes::EthereumAdapter(Box::new(
7878
EthereumAdapter::init(options, &config).expect("failed to init adapter"),
79-
)
79+
))
8080
}
8181
"dummy" => {
8282
let dummy_identity = cli.value_of("dummyIdentity").unwrap();
@@ -89,20 +89,20 @@ fn main() {
8989
keystore_file: None,
9090
keystore_pwd: None,
9191
};
92-
AdapterTypes::DummyAdapter(
92+
AdapterTypes::DummyAdapter(Box::new(
9393
DummyAdapter::init(options, &config).expect("failed to init adapter"),
94-
)
94+
))
9595
}
9696
// @TODO exit gracefully
9797
_ => panic!("We don't have any other adapters implemented yet!"),
9898
};
9999

100100
match adapter {
101101
AdapterTypes::EthereumAdapter(ethadapter) => {
102-
run(is_single_tick, &sentry_url, &config, ethadapter)
102+
run(is_single_tick, &sentry_url, &config, *ethadapter)
103103
}
104104
AdapterTypes::DummyAdapter(dummyadapter) => {
105-
run(is_single_tick, &sentry_url, &config, dummyadapter)
105+
run(is_single_tick, &sentry_url, &config, *dummyadapter)
106106
}
107107
}
108108
}

0 commit comments

Comments
 (0)