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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
//
// pub fn check_run(b: Box<RgTopLevelSubcommand>) -> bool {
// if let RgTopLevelSubcommand::Node(_) = *b {
// false
// } else if let RgTopLevelSubcommand::GUI(_) = *b {
// false
// } else {
// true
// }
// }
//
// // returns if aborting remainder.
// pub async fn immediate_commands(
// config: &Box<NodeConfig>, subcmd: Option<Box<RgTopLevelSubcommand>>
// ) -> bool {
// match subcmd {
// Some(subcmd) => {
// if check_run(subcmd.clone()) {
// immediate_commands_inner(subcmd, config).await;
// return true
// }
// }
// None => {
// }
// }
// false
// }
//
// // Pre logger commands
// pub async fn immediate_commands_inner(
// subcmd: Box<RgTopLevelSubcommand>, config: &Box<NodeConfig>
// ) {
// let ret = {
// // Use references to avoid cloning
// match &*subcmd {
//
// _ => Ok(())
// }
// };
// ret.expect("immediate command failed");
//
// drop(subcmd);
// //
// //
// // }
//
//
// }
// RgTopLevelSubcommand::TestTransaction(test_transaction_cli) => {
// commands::test_transaction(&test_transaction_cli, &config).await
// }
// RgTopLevelSubcommand::TestBitcoinBalance(_b) => {
// commands::test_btc_balance(args.get(0).unwrap(), config.network.clone()).await;
// Ok(())
// }
// RgTopLevelSubcommand::ConvertMetadataXpub(b) => {
// commands::convert_metadata_xpub(&b.metadata_file).await
// }
// RgTopLevelSubcommand::GenerateWords(m) => {
// commands::generate_mnemonic(&m)
// },
// RgTopLevelSubcommand::Faucet(a) => {
// commands::faucet(&a, &config).await
// }
// RgTopLevelSubcommand::AddServer(a) => {
// commands::add_server(a, &config).await
// }