Skip to content

Commit 2e06798

Browse files
committed
removed state in tests
1 parent eb8a39b commit 2e06798

File tree

1 file changed

+1
-49
lines changed

1 file changed

+1
-49
lines changed

apps/fortuna/src/api.rs

Lines changed: 1 addition & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -596,54 +596,6 @@ mod test {
596596

597597
#[tokio::test]
598598
async fn test_chain_configs_with_data() {
599-
// Create a test server with actual chain configurations
600-
let eth_read = Arc::new(MockEntropyReader::with_requests(10, &[]));
601-
let avax_read = Arc::new(MockEntropyReader::with_requests(10, &[]));
602-
603-
let eth_state = MonitoredHashChainState::new(
604-
ETH_CHAIN.clone(),
605-
Default::default(),
606-
"ethereum".into(),
607-
PROVIDER,
608-
);
609-
610-
let eth_state = BlockchainState {
611-
id: "ethereum".into(),
612-
network_id: 1,
613-
state: Arc::new(eth_state),
614-
contract: eth_read.clone(),
615-
provider_address: PROVIDER,
616-
reveal_delay_blocks: 1,
617-
confirmed_block_status: BlockStatus::Latest,
618-
};
619-
620-
let avax_state = MonitoredHashChainState::new(
621-
AVAX_CHAIN.clone(),
622-
Default::default(),
623-
"avalanche".into(),
624-
PROVIDER,
625-
);
626-
627-
let avax_state = BlockchainState {
628-
id: "avalanche".into(),
629-
network_id: 43114,
630-
state: Arc::new(avax_state),
631-
contract: avax_read.clone(),
632-
provider_address: PROVIDER,
633-
reveal_delay_blocks: 2,
634-
confirmed_block_status: BlockStatus::Latest,
635-
};
636-
637-
let mut chains = HashMap::new();
638-
chains.insert(
639-
"ethereum".into(),
640-
ApiBlockChainState::Initialized(eth_state),
641-
);
642-
chains.insert(
643-
"avalanche".into(),
644-
ApiBlockChainState::Initialized(avax_state),
645-
);
646-
647599
// Create a config with actual chain data
648600
let mut config_chains = HashMap::new();
649601
config_chains.insert(
@@ -723,7 +675,7 @@ mod test {
723675

724676
let metrics_registry = Arc::new(RwLock::new(Registry::default()));
725677
let api_state = ApiState::new(
726-
Arc::new(RwLock::new(chains)),
678+
Arc::new(RwLock::new(HashMap::new())),
727679
metrics_registry,
728680
Arc::new(History::new().await.unwrap()),
729681
Arc::new(config),

0 commit comments

Comments
 (0)