Browse Source

json-rpc: Add failcode info in listforwards

htlc_accepted_hook
trueptolemy 6 years ago
committed by Christian Decker
parent
commit
3445abb553
  1. 1
      CHANGELOG.md
  2. 6
      lightningd/peer_htlcs.c

1
CHANGELOG.md

@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- JSON API: new plugin `invoice_payment` hook for intercepting invoices before they're paid.
- plugin: the `connected` hook can now send an `error_message` to the rejected peer.
- Protocol: we now enforce `option_upfront_shutdown_script` if a peer negotiates it.
- JSON API: `listforwards` now includes the local_failed forwards with failcode (Issue [#2435](https://github.com/ElementsProject/lightning/issues/2435), PR [#2524](https://github.com/ElementsProject/lightning/pull/2524))
### Changed

6
lightningd/peer_htlcs.c

@ -1915,6 +1915,12 @@ static void listforwardings_add_forwardings(struct json_stream *response, struct
"fee", "fee_msat");
json_add_string(response, "status", forward_status_name(cur->status));
if(cur->failcode != 0) {
json_add_num(response, "failcode", cur->failcode);
json_add_string(response, "failreason",
onion_type_name(cur->failcode));
}
#ifdef COMPAT_V070
/* If a forwarding doesn't have received_time it was created
* before we added the tracking, do not include it here. */

Loading…
Cancel
Save