mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 09:54:16 +01:00
json-rpc: Add failcode info in listforwards
This commit is contained in:
parent
11e9ad0ee0
commit
3445abb553
@ -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
|
||||
|
||||
|
@ -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…
Reference in New Issue
Block a user