<p><code>lncli pendingchannels</code> gives a <code>pendingChannelRespnse</code> which might have the <code>pending_open_channels</code> parameter. This contains an array of  <code>PendingOpenChannel</code> objects. </p>

<p>According to <a href="https://api.lightning.community/#pendingopenchannel" rel="nofollow noreferrer">the documentation</a> they should have a parameter <code>confirmation_height</code> which is the height of the blockchain at which the funding TX has enough confirmations (the max of your and your channel partners threshold) </p>

<p>See 
<img src="https://i.sstatic.net/LVKNX.jpg" alt="enter image description here"></p>

<p>So from <code>bitcoin-cli</code> you figure out the current height and take the difference to see how many confirmations are still needed. </p>

<p>I guess if you don't get a pendingopenchannel object you don't have confirmations yet. </p>

CC BY-SA 4.0
2019-07-21T19:42:12.930Z
Thank you I see "confirmation_height": 0,
Kortik
CC BY-SA 4.0
2019-07-21T23:59:54.207Z
its just I've been waiting for several days for someone opening channel to me but its always pending.I looked at the mempool and its empty therefore if a person who opened a channel to me set 1sat/byte then it should be confirmed but I cannot even see the transaction onchain. I am confused.
Kortik
CC BY-SA 4.0
2019-07-23T09:05:37.143Z
I have been contacted by another person running c Lightning having a similar issue. and I have the idea that you have a power that does (deliberately?) not follow the channel establishment protocol. Can you see from the logfiles at which state of the channel establishment protocol you are in? Which BOLT 02 messages have been exchanged so far? Maybe your node did not send `funding _signed` message?  (obviously I am guessing here as I don't have full information)
Rene Pickhardt
CC BY-SA 4.0
2019-07-23T18:30:34.903Z
I don't use BOLT
Kortik
CC BY-SA 4.0
2019-07-30T05:26:43.473Z
I have no idea what BOLT means my misunderstanding. So I don't know how to do all that Rene.
Kortik
CC BY-SA 4.0
2019-07-30T12:00:25.247Z
Well I was asking for your logfile and in particular the entire that concern the channel opening protocol. I have just released a video about channel closure on my channel that might help you to understand the channel protocol BOLT 02 https://youtu.be/Gyt4nxRHy04. BOLT stands for basics of lightning vtechnologies and is the protocol specification that all implementations are following. This I am pretty sure you unknowingly are using the BOLTs (:
Rene Pickhardt
CC BY-SA 4.0
2019-07-20T23:15:31.413Z
2019-07-20T23:15:31.413Z
Rene Pickhardt
<p>To get the TX, using</p>
<blockquote>
<p>lncli pendingchannels</p>
</blockquote>
<p>You'll get a JSON document and the channel_point is your TX (Minus the :1 at the end)</p>

CC BY-SA 4.0
2020-11-14T18:36:43.147Z
2020-11-14T18:36:43.147Z
80sTron
<p>After typing <code>lncli pendingchannels</code> I get a channel_point number, and when I put channel_point txid to check if it was confirmed onchain 
by typing:</p>

<pre><code>bitcoin-cli gettransaction "txid insert"
</code></pre>

<p>I get an error:</p>

<pre><code>error code: -5
error message:
Ivalid or non-wallet transaction id
</code></pre>

<p>How can I  see if whoever opened (pending state) channel to me has a confirmation on chain?</p>

<transactions><lightning-network><lightning-network-daemon><transaction-id><ln-opening-channels>
How to find out if LND opening pending channels has a confirmation onchain?
Kortik
# How to find out if LND opening pending channels has a confirmation onchain?

(Asked by: username_0 on 2019-07-20)

After typing lncli pendingchannels I get a channel_point number, and when I put channel_point txid to check if it was confirmed onchain 
by typing:
bitcoin-cli gettransaction "txid insert"

I get an error:
error code: -5
error message:
Ivalid or non-wallet transaction id

How can I  see if whoever opened (pending state) channel to me has a confirmation on chain?

**Tags:** transactions, lightning-network, lightning-network-daemon, transaction-id, ln-opening-channels


---

## 2 answers

### Answer by username_1 on 2019-07-20. Score: 1

`lncli pendingchannels` gives a `pendingChannelRespnse` which might have the `pending_open_channels` parameter. This contains an array of `PendingOpenChannel` objects.

According to [the documentation](https://api.lightning.community/#pendingopenchannel) they should have a parameter `confirmation_height` which is the height of the blockchain at which the funding TX has enough confirmations (the max of your and your channel partners threshold)

See
![enter image description here](https://i.sstatic.net/LVKNX.jpg)

So from `bitcoin-cli` you figure out the current height and take the difference to see how many confirmations are still needed.

I guess if you don't get a pendingopenchannel object you don't have confirmations yet.

> **Comments:**
> **username_0**: Thank you I see "confirmation_height": 0,  
> **username_0**: its just I've been waiting for several days for someone opening channel to me but its always pending.I looked at the mempool and its empty therefore if a person who opened a channel to me set 1sat/byte then it should be confirmed but I cannot even see the transaction onchain. I am confused.  
> **username_1**: I have been contacted by another person running c Lightning having a similar issue. and I have the idea that you have a power that does (deliberately?) not follow the channel establishment protocol. Can you see from the logfiles at which state of the channel establishment protocol you are in? Which BOLT 02 messages have been exchanged so far? Maybe your node did not send `funding _signed` message?  (obviously I am guessing here as I don't have full information)  
> **username_0**: I don't use BOLT  
> **username_0**: I have no idea what BOLT means my misunderstanding. So I don't know how to do all that Rene.  
> **username_1**: Well I was asking for your logfile and in particular the entire that concern the channel opening protocol. I have just released a video about channel closure on my channel that might help you to understand the channel protocol BOLT 02 https://youtu.be/Gyt4nxRHy04. BOLT stands for basics of lightning vtechnologies and is the protocol specification that all implementations are following. This I am pretty sure you unknowingly are using the BOLTs (:  

---

### Answer by username_2 on 2020-11-14. Score: 0

To get the TX, using

> lncli pendingchannels

You'll get a JSON document and the channel\_point is your TX (Minus the :1 at the end)


---

