mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-21 14:24:09 +01:00
gossip: make rpc responses correct.
It's not fee_per_kw, it's fee-per-millionth and a base in msatoshi. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
28553308e2
commit
4be7e94e0b
4 changed files with 12 additions and 5 deletions
|
@ -573,7 +573,8 @@ static struct io_plan *getchannels_req(struct io_conn *conn, struct daemon *daem
|
|||
entries[num_chans].short_channel_id = n->out[j]->short_channel_id;
|
||||
entries[num_chans].last_update_timestamp = n->out[j]->last_timestamp;
|
||||
if (entries[num_chans].last_update_timestamp >= 0) {
|
||||
entries[num_chans].fee_per_kw = n->out[j]->proportional_fee;
|
||||
entries[num_chans].base_fee_msat = n->out[j]->base_fee;
|
||||
entries[num_chans].fee_per_millionth = n->out[j]->proportional_fee;
|
||||
entries[num_chans].delay = n->out[j]->delay;
|
||||
}
|
||||
num_chans++;
|
||||
|
|
|
@ -310,7 +310,10 @@ static bool json_getchannels_reply(struct subd *gossip, const u8 *reply,
|
|||
if (entries[i].last_update_timestamp >= 0) {
|
||||
json_add_num(response, "last_update",
|
||||
entries[i].last_update_timestamp);
|
||||
json_add_num(response, "fee_per_kw", entries[i].fee_per_kw);
|
||||
json_add_num(response, "base_fee_millisatoshi",
|
||||
entries[i].base_fee_msat);
|
||||
json_add_num(response, "fee_per_millionth",
|
||||
entries[i].fee_per_millionth);
|
||||
json_add_num(response, "delay", entries[i].delay);
|
||||
}
|
||||
json_object_end(response);
|
||||
|
|
|
@ -48,7 +48,8 @@ void fromwire_gossip_getchannels_entry(const u8 **pptr, size_t *max,
|
|||
entry->flags = fromwire_u16(pptr, max);
|
||||
entry->last_update_timestamp = fromwire_u64(pptr, max);
|
||||
if (entry->last_update_timestamp >= 0) {
|
||||
entry->fee_per_kw = fromwire_u32(pptr, max);
|
||||
entry->base_fee_msat = fromwire_u32(pptr, max);
|
||||
entry->fee_per_millionth = fromwire_u32(pptr, max);
|
||||
entry->delay = fromwire_u32(pptr, max);
|
||||
}
|
||||
}
|
||||
|
@ -63,7 +64,8 @@ void towire_gossip_getchannels_entry(
|
|||
towire_u16(pptr, entry->flags);
|
||||
towire_u64(pptr, entry->last_update_timestamp);
|
||||
if (entry->last_update_timestamp >= 0) {
|
||||
towire_u32(pptr, entry->fee_per_kw);
|
||||
towire_u32(pptr, entry->base_fee_msat);
|
||||
towire_u32(pptr, entry->fee_per_millionth);
|
||||
towire_u32(pptr, entry->delay);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,7 +17,8 @@ struct gossip_getchannels_entry {
|
|||
s64 last_update_timestamp; /* -1 means never */
|
||||
/* These are only set if last_update_timestamp >= 0 */
|
||||
u32 delay;
|
||||
u32 fee_per_kw;
|
||||
u32 base_fee_msat;
|
||||
u32 fee_per_millionth;
|
||||
};
|
||||
|
||||
void fromwire_gossip_getnodes_entry(const tal_t *ctx, const u8 **pptr,
|
||||
|
|
Loading…
Add table
Reference in a new issue