Browse Source

API: 'listforwards' now include 'payment_hash' field

'payment_hash' can help users learn more about the forward payment.
pull/2938/head
trueptolemy 6 years ago
committed by ZmnSCPxj, ZmnSCPxj jxPCSmnZ
parent
commit
bcec6bb6cc
  1. 1
      CHANGELOG.md
  2. 3
      lightningd/peer_htlcs.c

1
CHANGELOG.md

@ -23,6 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- plugins: a new boolean field can be added to a plugin manifest, `dynamic`. It allows a plugin to tell if it can be started or stopped "on-the-fly".
- lightningd: check bitcoind version when setup topology and confirm the version not older than v0.15.0.
- startup: space out reconnections on startup if we have more than 5 peers.
- JSON API: `listforwards` includes the 'payment_hash' field.
### Deprecated

3
lightningd/peer_htlcs.c

@ -2114,6 +2114,9 @@ static void listforwardings_add_forwardings(struct json_stream *response, struct
const struct forwarding *cur = &forwardings[i];
json_object_start(response, NULL);
json_add_hex(response, "payment_hash",
cur->payment_hash,
sizeof(*cur->payment_hash));
json_add_short_channel_id(response, "in_channel", &cur->channel_in);
json_add_short_channel_id(response, "out_channel", &cur->channel_out);
json_add_amount_msat_compat(response,

Loading…
Cancel
Save