Comments (1)
Thanks for the issue report @kulisekf!
I've reproduced the issue and have verified that "settled_balance" indeed doesn't include the local balance if a non wallet close_address
is passed when opening the channel.
The issue is that in chain_watcher.go
we assign the value for the SettledBalance
to the local localAmt
variable:
lnd/contractcourt/chain_watcher.go
Line 1022 in 5cb4811
The localAmt
variable is assigned at:
lnd/contractcourt/chain_watcher.go
Line 1010 in 5cb4811
Now the toSelfAmount
func will currently only return balance for addresses which are controlled by the wallet due to the definition of the isOurAddr
func, and not for non wallet addresses, despite the fact the address has been sent in as our close_address
for the channel.
lnd/contractcourt/chain_watcher.go
Lines 976 to 995 in 5cb4811
That behaviour would need to be changed in order to solve this issue.
I think a potential solution would be to modify the isOurAddr
func that is sent in to chainWatcher
, and that the function also matches against the close_address
if one has been set. Though I haven't verified if this would work as expected nor if this is the optimal solution.
lnd/contractcourt/chain_arbitrator.go
Line 1146 in 5cb4811
The isOurAddr
func would also need to be updated if an address is passed as the delivery_addr
during the closechannel
call.
from lnd.
Related Issues (20)
- [bug]: lncli openchannel breaking change - fee preference HOT 2
- NewAddress returns duplicate addresses HOT 4
- [feature]: unify address creation behavior between `BtcWalletKeyRing.DeriveNextKey` and `BtcWalletKeyRing.DeriveKey`
- [bug]: I'm completely unable to be synced with the Lightning network. HOT 2
- [bug]: Cannot send coins with 1 sat/vB HOT 6
- [bug]: Creating a new channel
- [bug]: Regression: Missing newline in "Shutdown complete" log message HOT 11
- [bug]: sweep: data race on TxPublisher.currentHeight HOT 2
- [bug]: `ChannelRouter` cannot be shutdown while the `syncGraphWithChain` function is running. HOT 4
- [bug]: Inbound fees are not in the gossip message when using `subscribeChannelGraph` HOT 2
- [bug]: Ping time is not accurate HOT 1
- [feature]: lncli command for walletrpc.EstimateFee HOT 4
- [bug]: Unable to pay AMP invoice with `amp` flag set to true
- Add new RPCs to control the fee bumping process
- [bug]: sweep: BumpFee can cause transaction conflicts HOT 1
- [bug]: contractcourt: max budget used immediately for anchor sweeps HOT 3
- [bug]: sweep: LinearFeeFunction off by one HOT 6
- [feature]: sweep: eliminate change address reuse HOT 2
- [bug]: sweep: AddWalletInputs modifies BudgetInputSet when error occurs
- [feature]: sweep: implement alternative fee functions
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lnd.