(txid, outnum)
| 317 | results = l2.db_query('SELECT hex(full_channel_id) AS cid, hex(funding_tx_id) as txid, funding_tx_outnum FROM channels') |
| 318 | |
| 319 | def _chan_id(txid, outnum): |
| 320 | chanid = bytearray.fromhex(txid) |
| 321 | chanid[-1] ^= outnum % 256 |
| 322 | chanid[-2] ^= outnum // 256 |
| 323 | return chanid.hex() |
| 324 | |
| 325 | for row in results: |
| 326 | assert _chan_id(row['txid'], row['funding_tx_outnum']) == row['cid'].lower() |
no outgoing calls
no test coverage detected