Skip to content

Instantly share code, notes, and snippets.

@tyzbit
Created May 30, 2019 01:27
Show Gist options
  • Save tyzbit/bc81182d7c0816c93f21262f418dcf14 to your computer and use it in GitHub Desktop.
Save tyzbit/bc81182d7c0816c93f21262f418dcf14 to your computer and use it in GitHub Desktop.

I created channel with 2,000,000 locally between nodes 1 and 2

I sent 1,000,000 from node 1 to node 2

I then backed up node 2

Then I sent 1,000 from node 2 to node 1

{
    "channels": [
        {
            "active": true,
            "remote_pubkey": "02c7833700571011235aa2d4824760648223c213daf94051bd217d881e716e1bc5",
            "channel_point": "8a6b1e3c2313bfb88b66eec4327d43bb1146bcff13cea39dc0346ebea272d9a8:0",
            "chan_id": "1670088893362667520",
            "capacity": "2000000",
            "local_balance": "999000",
            "remote_balance": "1000817",
            "commit_fee": "183",
            "commit_weight": "724",
            "fee_per_kw": "253",
            "unsettled_balance": "0",
            "total_satoshis_sent": "1000",
            "total_satoshis_received": "1000000",
            "num_updates": "4",
            "pending_htlcs": [
            ],
            "csv_delay": 240,
            "private": false,
            "initiator": false,
            "chan_status_flags": "ChanStatusDefault"
        }
    ]
}

I shut down both nodes, restored from backup on node 2

{
    "channels": [
        {
            "active": false,
            "remote_pubkey": "02c7833700571011235aa2d4824760648223c213daf94051bd217d881e716e1bc5",
            "channel_point": "8a6b1e3c2313bfb88b66eec4327d43bb1146bcff13cea39dc0346ebea272d9a8:0",
            "chan_id": "1670088893362667520",
            "capacity": "2000000",
            "local_balance": "1000000",
            "remote_balance": "999817",
            "commit_fee": "183",
            "commit_weight": "724",
            "fee_per_kw": "253",
            "unsettled_balance": "0",
            "total_satoshis_sent": "0",
            "total_satoshis_received": "1000000",
            "num_updates": "2",
            "pending_htlcs": [
            ],
            "csv_delay": 240,
            "private": false,
            "initiator": false,
            "chan_status_flags": "ChanStatusDefault"
        }
    ]
}

I then force closed the channel

{
        "closing_txid": "f3baa3ffb9a4016529bad8657a727b94697e77922b126f54f564ffbc72f20540"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment