()
| 13 | |
| 14 | #[tokio::test] |
| 15 | async fn test_sync() { |
| 16 | let mut config = setup_test().await; |
| 17 | |
| 18 | println!("Read from remote"); |
| 19 | config.client_0.sync().await; |
| 20 | |
| 21 | println!("Modify data and save"); |
| 22 | let amount = Amount::from_sat(INITIAL_AMOUNT + PEG_OUT_FEE + 1); |
| 23 | let faucet = Faucet::new(FaucetType::EsploraRegtest); |
| 24 | let address = generate_pay_to_pubkey_script_address( |
| 25 | config.depositor_context.network, |
| 26 | &config.depositor_context.depositor_public_key, |
| 27 | ); |
| 28 | faucet.fund_input(&address, amount).await.wait().await; |
| 29 | |
| 30 | let outpoint = generate_stub_outpoint(&config.client_0, &address, amount).await; |
| 31 | |
| 32 | println!("Creating peg in graph ..."); |
| 33 | let peg_in_graph_id = config |
| 34 | .client_0 |
| 35 | .create_peg_in_graph(Input { outpoint, amount }, &config.depositor_evm_address) |
| 36 | .await; |
| 37 | |
| 38 | println!("Creating peg out graph ..."); |
| 39 | config.client_0.create_peg_out_graph( |
| 40 | &peg_in_graph_id, |
| 41 | Input { |
| 42 | outpoint: generate_stub_outpoint( |
| 43 | &config.client_0, |
| 44 | &generate_pay_to_pubkey_script_address( |
| 45 | config.depositor_context.network, |
| 46 | &config.depositor_context.depositor_public_key, |
| 47 | ), |
| 48 | amount, |
| 49 | ) |
| 50 | .await, |
| 51 | amount, |
| 52 | }, |
| 53 | config.commitment_secrets, |
| 54 | ); |
| 55 | |
| 56 | println!("Save to remote"); |
| 57 | config.client_0.flush().await; |
| 58 | } |
nothing calls this directly
no test coverage detected