Skip to content

Update Funding tx id value in GUI when funding is signed#511

Merged
pm47 merged 2 commits intoACINQ:masterfrom
natewave:master
Mar 28, 2018
Merged

Update Funding tx id value in GUI when funding is signed#511
pm47 merged 2 commits intoACINQ:masterfrom
natewave:master

Conversation

@natewave
Copy link
Contributor

@natewave natewave commented Mar 25, 2018

Currently the only time the "Funding tx id" text in GUI is updated is upon receiving the ChannelRestored event, which means that if the GUI is not restarted the value keeps showing "N/A".

I have started fixing it in this PR but I'm not sure about when the value should be updated:

  • As soon as we have a signed funding ? (this PR)
  • Only after the funding tx has been published ?
  • Only after the funding tx has been confirmed ?

How about adding the status of the funding tx as well next to the tx id value, eg, GUI would show:

Funding tx id: a373e728dba3b97801b17a2a8d534d63c095304768012329427bd85c786e8b1b (SIGNED|PUBLISHED/CONFIRMING|CONFIRMED)

or maybe it would conflict with the channel "NORMAL, WAIT_FOR_..." states shown in the GUI as well (unless it's an OFFLINE state)

Currently the only time the "Funding tx id" text in GUI is updated is
upon receiving the ChannelRestored event, which means that if the GUI is
not restarted the value keeps showing "N/A".

I have started fixing it in this PR but I'm not sure about when the
value should be updated:

* As soon as we have a signed funding ?
* Only after the funding tx has been published ?
* Only after the funding tx has been confirmed ?

How about adding the status of the funding tx as well next to the id
value, eg:

Funding tx id:
a373e728dba3b97801b17a2a8d534d63c095304768012329427bd85c786e8b1b
(SIGNED|PUBLISHED/CONFIRMING|CONFIRMED)
@dpad85
Copy link
Member

dpad85 commented Mar 27, 2018

Thanks for the PR!

Creating a new ChannelFundingSigned event is one way to do it. However it adds some specialized code and I think a simpler solution would be to use currentData in ChannelStateChanged. You can extract the tx id when this data is of type DATA_WAIT_FOR_FUNDING_CONFIRMED.

Adding the status of the funding tx (or the number of confirmations) does not bring a lot of value compared to the state of the channel. It might even confuse beginners, and for power users, it's easy to check the status of the funding tx from bitcoin core.

Copy link
Member

@dpad85 dpad85 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@pm47 pm47 merged commit 83d726d into ACINQ:master Mar 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants