1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// use std::collections::HashMap;
// use std::rc::Rc;
// use mocks::mock_oracle_provider::MockOracle;
// use mocks::mock_time::MockTime;
// use mocks::{
// memory_storage_provider::MemoryStorage, mock_blockchain::MockBlockchain,
// mock_wallet::MockWallet,
// };
// use mocks::dlc_manager::manager::Manager;
// use secp256k1_zkp::rand::rngs::mock::StepRng;
// use secp256k1_zkp::{KeyPair, SecretKey, XOnlyPublicKey};
// #[test]
// fn contract_create_settle_does_not_panic() {
// let blockchain = Rc::new(MockBlockchain::new());
// let alice_store = Rc::new(MemoryStorage::new());
// let alice_wallet = MockWallet::new(&blockchain, 100);
// let oracle_list = (0..5).map(|_| MockOracle::new()).collect::<Vec<_>>();
// let oracles: HashMap<bitcoin::XOnlyPublicKey, _> = oracle_list
// .iter()
// .map(|x| (x.get_public_key(), x))
// .collect();
// let time = MockTime {};
// mocks::mock_time::set_time(0);
// let alice_manager = Manager::new(
// &alice_wallet,
// blockchain.clone(),
// alice_store.clone(),
// oracles,
// time,
// fee_estimator,
// );
// }
// pub fn get_x_only_public_key() -> secp256k1_zkp::XOnlyPublicKey {
// let mut rng = StepRng::new(1, 1);
// let sk = SecretKey::new(&mut rng);
// let kp = KeyP
// XOnlyPublicKey::from_keypair(keypair)
// }