MCPcopy Create free account
hub / github.com/ElementsProject/lightning / read_channel_reply

Function read_channel_reply

tests/test_connection.py:5281–5288  ·  view source on GitHub ↗

Read past gossip chatter to openingd's answer to our open_channel.

(lconn)

Source from the content-addressed store, hash-verified

5279
5280
5281def read_channel_reply(lconn):
5282 """Read past gossip chatter to openingd's answer to our open_channel."""
5283 for _ in range(20):
5284 msg = lconn.read_message()
5285 mtype = int.from_bytes(msg[0:2], 'big')
5286 if mtype in (WIRE_ACCEPT_CHANNEL, WIRE_WARNING, WIRE_ERROR):
5287 return mtype
5288 raise AssertionError("no reply to open_channel")
5289
5290
5291def send_funding_created(lconn, temp_chan_id):

Calls 2

read_messageMethod · 0.80
from_bytesMethod · 0.45

Tested by

no test coverage detected