tee8z / doppler

A tool for building out a local regtest environment
Creative Commons Zero v1.0 Universal
38 stars 6 forks source link

Is it possible to use this for onchain only? #79

Closed thebrandonlucas closed 4 months ago

thebrandonlucas commented 4 months ago

I am trying to setup 2 wallets with UTXOs in order to do a payjoin, like so:

BITCOIND_MINER sender
BITCOIND receiver

UP
sender MINE_BLOCKS 200
sender SEND_ONCHAIN receiver AMT 100

Here is the output:

RUST_BACKTRACE=1 cargo run --bin doppler -- -f "doppler_files/payjoin_setup.doppler" -d
warning: value assigned to `subcommand` is never read
   --> src/lnd_actions/lnd_cli.rs:414:17
    |
414 |         let mut subcommand = String::from("");
    |                 ^^^^^^^^^^
    |
    = help: maybe it is overwritten before being read?
    = note: `#[warn(unused_assignments)]` on by default

warning: `doppler` (lib) generated 1 warning
    Finished dev [unoptimized + debuginfo] target(s) in 0.07s
     Running `target/debug/doppler -f doppler_files/payjoin_setup.doppler -d`
[2024-05-14T23:18:52.178896000Z INFO] rest false
thread 'main' panicked at src/workflow.rs:60:10:
parse error: Error { variant: ParsingError { positives: [ln_node_action_type, btc_node_action_type], negatives: [] }, location: Pos(90), line_col: Pos((7, 8)), path: None, line: "sender SEND_ONCHAIN receiver AMT 1", continued_line: None }
stack backtrace:
   0: rust_begin_unwind
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:645:5
   1: core::panicking::panic_fmt
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/panicking.rs:72:14
   2: core::result::unwrap_failed
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/result.rs:1649:5
   3: core::result::Result<T,E>::expect
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/result.rs:1030:23
   4: doppler::workflow::run_workflow_until_stop
             at ./src/workflow.rs:59:18
   5: doppler::main
             at ./src/main.rs:66:5
   6: core::ops::function::FnOnce::call_once
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

I'm assuming something like this would be possible? If so, what am I doing wrong?

Thanks

thebrandonlucas commented 4 months ago

I was able to achieve the setup I was looking for by doing the following:

BITCOIND_MINER sender
BITCOIND_MINER receiver

UP
sender MINE_BLOCKS 200
receiver MINE_BLOCKS 200

I'm still curious if it's possible to do this with SEND_ONCHAIN, but I'll go ahead and close this.