-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: test that ldk node can send onion message
- Loading branch information
1 parent
14e43a6
commit b3e4248
Showing
2 changed files
with
44 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,13 @@ | ||
mod common; | ||
|
||
#[tokio::test] | ||
async fn test_ldk_onion_messages() { | ||
let (_bitcoind, _bitcoin_dir) = common::setup_test_infrastructure().await; | ||
#[tokio::test(flavor = "multi_thread")] | ||
async fn test_ldk_send_onion_message() { | ||
let test_name = "send_onion_message"; | ||
let (_bitcoind, _bitcoin_dir, ldk1, ldk2) = common::setup_test_infrastructure(test_name).await; | ||
let (node_id_2, node_addr_2) = ldk2.get_node_info(); | ||
ldk1.connect_to_peer(node_id_2, node_addr_2).await.unwrap(); | ||
|
||
let data: Vec<u8> = vec![72, 101, 108, 108, 111]; | ||
let res = ldk1.send_onion_message(vec![node_id_2], 65, data).await; | ||
assert!(res.is_ok()); | ||
} |