mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-23 00:54:20 +01:00
lightningd: don't put old deprecated local_msat and remote_msat in listpeerchannels.
These were deprecated in v0.12.0, hence scheduled for removal next version anyway (use local_fund_msat and remote_funds_msat). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Alex Myers
parent
b7ab80963d
commit
49b3459be5
@@ -862,7 +862,8 @@ static void json_add_channel(struct lightningd *ld,
|
||||
|
||||
json_object_start(response, "funding");
|
||||
|
||||
if (deprecated_apis) {
|
||||
/* We don't put v0.12-deprecated fields into listpeerchannels */
|
||||
if (deprecated_apis && !peer) {
|
||||
json_add_sat_only(response, "local_msat", channel->our_funds);
|
||||
json_add_sat_only(response, "remote_msat", peer_funded_sats);
|
||||
json_add_amount_msat_only(response, "pushed_msat", channel->push);
|
||||
@@ -921,7 +922,7 @@ static void json_add_channel(struct lightningd *ld,
|
||||
channel->our_funds);
|
||||
json_add_sat_only(response, "remote_funds_msat",
|
||||
peer_funded_sats);
|
||||
if (!deprecated_apis)
|
||||
if (!deprecated_apis || peer)
|
||||
json_add_amount_msat_only(response, "pushed_msat",
|
||||
channel->push);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user