Renaming a few things in HTLC creation to make flow more memorable
This commit is contained in:
@@ -11,18 +11,14 @@ pub(crate) async fn run() -> anyhow::Result<()> {
|
||||
|
||||
// format a new commitment transaction like in Lightning
|
||||
let mut commitment_builder = dave.wallet.build_tx();
|
||||
let amount = 500;
|
||||
let value = 500;
|
||||
let recipient = sammy.wallet.get_address(New)?.script_pubkey();
|
||||
let hash_preimage = utils::sha256("blah".to_string());
|
||||
let hash_preimage = "blah".to_string();
|
||||
let hashlock = utils::sha256(hash_preimage);
|
||||
|
||||
// Feed it 500 sats, a redeem identity, a hashlock, a refund timelock, and a refund identity
|
||||
// Feed it a redeem identity, a hashlock from the preimage, a refund timelock, and a refund identity
|
||||
//
|
||||
let htlc = bitcoin::htlc::Htlc::new(
|
||||
dave.external_public_key,
|
||||
hash_preimage,
|
||||
100,
|
||||
sammy.external_public_key,
|
||||
);
|
||||
let htlc = bitcoin::htlc::Htlc::new(dave.public_key, hashlock, 100, sammy.public_key);
|
||||
|
||||
let htlc_descriptor = htlc.to_miniscript_descriptor();
|
||||
tracing::info!("descriptor: {}", htlc_descriptor);
|
||||
|
||||
Reference in New Issue
Block a user