Git Product home page Git Product logo

Comments (5)

brijananand avatar brijananand commented on August 25, 2024

This error message is displayed when you create a channel and the funds from the on-chain network has yet to be confirmed. The funding transaction here means an on-chain (bitcoin blockchain) transaction which can only be spent by mutual consent of the parties involved.

This is the code for reference:
Source: https://github.com/lightningnetwork/lnd/blob/master/lnwallet/wallet.go

// ErrInsufficientFunds is a type matching the error interface which is
// returned when coin selection for a new funding transaction fails to due
// having an insufficient amount of confirmed funds.
type ErrInsufficientFunds struct {
	amountAvailable btcutil.Amount
	amountSelected  btcutil.Amount
}

func (e *ErrInsufficientFunds) Error() string {
	return fmt.Sprintf("not enough witness outputs to create funding transaction,"+
		" need %v only have %v  available", e.amountAvailable,
		e.amountSelected)
}

from lightning-app.

djpnewton avatar djpnewton commented on August 25, 2024

Thanks for that info. The app showed an incoming transaction that was "confirmed" though

from lightning-app.

brijananand avatar brijananand commented on August 25, 2024

djpnewton Sorry for asking this, but I'm just curious - was it 2 confirmations? I had to wait for 2 confirmations.

Edit: Nvm, ignore this. I've just checked I think 1 confirmation at the moment is enough for the tx to show up. I wonder why the error shows up, unless there's some issue and the wallet is getting out of sync. Sorry about that, would also like to know why this issue might have occurred.

Edit 2: I've faced this issue twice yesterday as well. I've cleared off my data folder and started to re-sync from scratch to check if it resolves it.

from lightning-app.

Raulo avatar Raulo commented on August 25, 2024

There is likely a bug in dealing with the bitcoin change. I successfully opened a channel but when trying to open other
$ lncli openchannel --node_key=03933884aaf1d6b108397e5efe5c86bcf2d8ca8d2f700eda99db9214fc2712b134 --local_amt=500000 --push_amt=100000

[lncli] rpc error: code = Unknown desc = not enough witness outputs to create funding transaction, need 0.005 BTC only have 0 BTC available

However, there are funds:

$ lncli walletbalance
{
"balance": "8968004"
}

and these funds are confirmed in a change

lncli listchaintxns
{
"transactions": [
{
"tx_hash": "f575e7ddc1cfd8eed1474d9989ce97c7cc230d533d8aad5e98ead721d870f184",
"amount": "10000000",
"num_confirmations": 1114,
"block_hash": "0000000002b04dde40e0941c8223108ac7b9eb7bd569fc0def2249cef1065239",
"block_height": 1231725,
"time_stamp": "1511596146",
"total_fees": "0"
},
{
"tx_hash": "f6fd2103a2d058083ccbd83b86848582438adeb6efc74a4f6bdab1d2ba0d2e82",
"amount": "-17332",
"num_confirmations": 1112,
"block_hash": "00000000018d98ab78c197ce6a66fa3923c491376cc4e244eedc48a2b2808fbf",
"block_height": 1231727,
"time_stamp": "1511598595",
"total_fees": "7332"
},
{
"tx_hash": "81f8cb31f888ef0446f963b6b08576e83b1105b3b138c30e4c1d6d04f8ebe191",
"amount": "-507332",
"num_confirmations": 1067,
"block_hash": "000000005e06aedd36733de436ee1b5cee382ed6da673e218a9036ed308f524d",
"block_height": 1231772,
"time_stamp": "1511610581",
"total_fees": "7332"
},
{
"tx_hash": "2e0f6a7f0924c5c8abe1bb9a8f41b926d7124d07ecc81b886a376a294d12878b",
"amount": "-507332",
"num_confirmations": 1065,
"block_hash": "00000000681aec6cda6bccb1bc2edcbeeabc75d57e4548744c64207fed7c0d25",
"block_height": 1231774,
"time_stamp": "1511613004",
"total_fees": "7332"
}
]
}

When I restart lnd, the channel opening goes through.

from lightning-app.

Roasbeef avatar Roasbeef commented on August 25, 2024

When I restart lnd, the channel opening goes through.

This has been fixed with lightningnetwork/lnd@c986e52. Closing.

from lightning-app.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.