Skip to content
This repository has been archived by the owner on Sep 18, 2022. It is now read-only.

Allow opening channels with unconfirmed inputs. #72

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions logic/lightning.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ function decodePaymentRequest(paymentRequest) {
// generate our own unused address and then feed that into the existing call. Then we add an extra 10 sats per
// feerateSatPerByte. This is because the actual cost is slightly more than the default one output estimate.
async function estimateChannelOpenFee(amt, confTarget, sweep) {

// TODO: Make this work with spend_unconfirmed

const address = (await generateAddress()).address;
const baseFeeEstimate = await estimateFee(address, amt, confTarget, sweep);

Expand Down
1 change: 1 addition & 0 deletions services/lnd.js
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@ function openChannel(pubKey, amt, satPerByte) {
const rpcPayload = {
node_pubkey_string: pubKey,
local_funding_amount: amt,
spend_unconfirmed: true,
};

if (satPerByte) {
Expand Down