diff --git a/gossipd/gossip.c b/gossipd/gossip.c index 0e1629628..df9142872 100644 --- a/gossipd/gossip.c +++ b/gossipd/gossip.c @@ -1116,6 +1116,7 @@ static void append_half_channel(struct gossip_getchannels_entry **entries, e->source = chan->nodes[idx]->id; e->destination = chan->nodes[!idx]->id; + e->satoshis = chan->satoshis; e->active = c->active; e->flags = c->flags; e->public = (c->channel_update != NULL); diff --git a/lightningd/gossip_control.c b/lightningd/gossip_control.c index fa9a496ed..aeab89f66 100644 --- a/lightningd/gossip_control.c +++ b/lightningd/gossip_control.c @@ -444,6 +444,7 @@ static void json_listchannels_reply(struct subd *gossip UNUSED, const u8 *reply, json_add_num(response, "flags", entries[i].flags); json_add_bool(response, "active", entries[i].active); json_add_bool(response, "public", entries[i].public); + json_add_u64(response, "satoshis", entries[i].satoshis); if (entries[i].last_update_timestamp >= 0) { json_add_num(response, "last_update", entries[i].last_update_timestamp); diff --git a/lightningd/gossip_msg.c b/lightningd/gossip_msg.c index e35bddb6c..80361d1c6 100644 --- a/lightningd/gossip_msg.c +++ b/lightningd/gossip_msg.c @@ -71,6 +71,7 @@ void fromwire_gossip_getchannels_entry(const u8 **pptr, size_t *max, fromwire_short_channel_id(pptr, max, &entry->short_channel_id); fromwire_pubkey(pptr, max, &entry->source); fromwire_pubkey(pptr, max, &entry->destination); + entry->satoshis = fromwire_u64(pptr, max); entry->active = fromwire_bool(pptr, max); entry->flags = fromwire_u16(pptr, max); entry->public = fromwire_bool(pptr, max); @@ -88,6 +89,7 @@ void towire_gossip_getchannels_entry( towire_short_channel_id(pptr, &entry->short_channel_id); towire_pubkey(pptr, &entry->source); towire_pubkey(pptr, &entry->destination); + towire_u64(pptr, entry->satoshis); towire_bool(pptr, entry->active); towire_u16(pptr, entry->flags); towire_bool(pptr, entry->public); diff --git a/lightningd/gossip_msg.h b/lightningd/gossip_msg.h index f040eb543..ebe575d69 100644 --- a/lightningd/gossip_msg.h +++ b/lightningd/gossip_msg.h @@ -14,6 +14,7 @@ struct gossip_getnodes_entry { struct gossip_getchannels_entry { struct pubkey source, destination; + u64 satoshis; bool active; struct short_channel_id short_channel_id; u16 flags;