Minor re-ordering
This commit is contained in:
@@ -9,19 +9,17 @@ pub(crate) async fn run() -> anyhow::Result<()> {
|
||||
let _ = dave.sync();
|
||||
let _ = sammy.sync();
|
||||
|
||||
// format a new commitment transaction like in Lightning
|
||||
let mut commitment_builder = dave.wallet.build_tx();
|
||||
// Create an HTLC descriptor with a redeem identity, a hashlock from the preimage,
|
||||
// a refund timelock, and a refund identity
|
||||
let value = 500;
|
||||
let recipient = sammy.wallet.get_address(New)?.script_pubkey();
|
||||
let hash_preimage = "blah".to_string();
|
||||
let hashlock = utils::sha256(hash_preimage);
|
||||
|
||||
// Create an HTLC descriptor with a redeem identity, a hashlock from the preimage,
|
||||
// a refund timelock, and a refund identity
|
||||
let htlc = bitcoin::htlc::Htlc::new(dave.public_key, hashlock, 100, sammy.public_key);
|
||||
|
||||
let htlc_descriptor = htlc.to_miniscript_descriptor();
|
||||
|
||||
// format a new commitment transaction like in Lightning
|
||||
let mut commitment_builder = dave.wallet.build_tx();
|
||||
commitment_builder.add_recipient(recipient, value);
|
||||
commitment_builder.enable_rbf();
|
||||
let (psbt, _) = commitment_builder
|
||||
|
||||
Reference in New Issue
Block a user