@@ -4,21 +4,17 @@ mod tests {
4
4
use crate :: persisted_dht:: load_dht;
5
5
use crate :: { NetworkConfig , NetworkService } ;
6
6
use beacon_chain:: test_utils:: BeaconChainHarness ;
7
- use beacon_processor:: {
8
- BeaconProcessorChannels , BeaconProcessorSend , MAX_SCHEDULED_WORK_QUEUE_LEN ,
9
- MAX_WORK_EVENT_QUEUE_LEN ,
10
- } ;
7
+ use beacon_processor:: { BeaconProcessorChannels , BeaconProcessorConfig } ;
11
8
use futures:: StreamExt ;
12
9
use lighthouse_network:: types:: { GossipEncoding , GossipKind } ;
13
10
use lighthouse_network:: { Enr , GossipTopic } ;
14
11
use slog:: { o, Drain , Level , Logger } ;
15
12
use sloggers:: { null:: NullLoggerBuilder , Build } ;
16
13
use std:: str:: FromStr ;
17
14
use std:: sync:: Arc ;
18
- use tokio:: { runtime:: Runtime , sync :: mpsc } ;
15
+ use tokio:: runtime:: Runtime ;
19
16
use types:: { Epoch , EthSpec , ForkName , MinimalEthSpec , SubnetId } ;
20
17
21
-
22
18
fn get_logger ( actual_log : bool ) -> Logger {
23
19
if actual_log {
24
20
let drain = {
@@ -147,18 +143,15 @@ mod tests {
147
143
config. discv5_config . table_filter = |_| true ; // Do not ignore local IPs
148
144
config. upnp_enabled = false ;
149
145
150
- let ( beacon_processor_send, _beacon_processor_receive) =
151
- mpsc:: channel ( MAX_WORK_EVENT_QUEUE_LEN ) ;
152
- let ( beacon_processor_reprocess_tx, _beacon_processor_reprocess_rx) =
153
- mpsc:: channel ( MAX_SCHEDULED_WORK_QUEUE_LEN ) ;
154
-
146
+ let beacon_processor_channels =
147
+ BeaconProcessorChannels :: new ( & BeaconProcessorConfig :: default ( ) ) ;
155
148
NetworkService :: build (
156
149
beacon_chain. clone ( ) ,
157
150
& config,
158
151
executor. clone ( ) ,
159
152
None ,
160
- BeaconProcessorSend ( beacon_processor_send ) ,
161
- beacon_processor_reprocess_tx ,
153
+ beacon_processor_channels . beacon_processor_tx ,
154
+ beacon_processor_channels . work_reprocessing_tx ,
162
155
)
163
156
. await
164
157
. unwrap ( )
0 commit comments