rgb-cln/channeld
Christian Decker c656cfe38d channeld: Fix the shutdown_sent billboard direction
While debugging a hanging channel with a user I noticed that they
called `close` on a channel, resulting in the channel showing
`CHANNELD_SHUTTING_DOWN`, but the billboard seemed to show the
information the wrong way around:

```json
{
   "peers": [
      {
         "connected": true,
	 // ...
         "channels": [
            {
               "state": "CHANNELD_SHUTTING_DOWN",
	       // ...
               "status": [
                  "CHANNELD_SHUTTING_DOWN:Reconnected, and reestablished.",
                  "CHANNELD_SHUTTING_DOWN:Funding transaction locked. They need our announcement signatures. They've sent shutdown, waiting for ours"
               ],
	       // ...
            }
         ]
      }
   ]
}
```

Aside from the hung channel, the switch in direction of the status
seemed weird. Checking the billboard code seems to have the status
switched as well:

ff8830876d/channeld/channeld.c (L223-L226)

We set `shutdown_sent[LOCAL]` when we send the shutdown:

ff8830876d/channeld/channeld.c (L823-L839)

And we set `shutdown_sent[REMOTE]` when we receive the shutdown:

ff8830876d/channeld/channeld.c (L1730-L1781)

So I think the billboard code just needs to be switched around.

Changelog-Fixed: JSON-RPC: The status of the shutdown meesages being exchanged is now displayed correctly.
2020-12-08 11:47:13 +10:30
..
test unittest: use common_setup / common_shutdown almost everywhere. 2020-12-02 12:55:09 +10:30
Makefile Makefile: unify generated files definition. 2020-10-22 12:14:34 +10:30
channeld.c channeld: Fix the shutdown_sent billboard direction 2020-12-08 11:47:13 +10:30
channeld_htlc.h Makefile: use completely separate spec-derived files for EXPERIMENTAL_FEATURES 2020-09-08 09:42:00 +09:30
channeld_wire.csv channeld: hand input blinding to lightningd. 2020-12-04 20:16:54 -06:00
channeld_wiregen.c wire/tlvstream: add tlv_make_fields helper to populate ->fields array. 2020-12-04 20:16:54 -06:00
channeld_wiregen.h wire/tlvstream: add tlv_make_fields helper to populate ->fields array. 2020-12-04 20:16:54 -06:00
commit_tx.c doc: update BOLT now option_anchor_outputs is merged. 2020-08-24 20:55:47 +09:30
commit_tx.h option_anchor_outputs: wire into all the subdaemons. 2020-08-14 11:51:14 +09:30
full_channel.c Makefile: unify generated files definition. 2020-10-22 12:14:34 +10:30
full_channel.h channel_id: save to database, dont derive from funding_txid 2020-09-09 19:54:20 +09:30
full_channel_error.h Makefile: make check-includes check all the non-generated files. 2020-10-22 12:14:34 +10:30
watchtower.c hsmd: convert to new wire generation style. 2020-08-25 12:53:13 +09:30
watchtower.h channeld: pass in HSM_FD as an argument to watchtower code. 2020-05-07 11:35:31 +02:00