feerate: use suffix, not separate argument.

And, reluctantly, default to bitcoind style.
"It's wrong to be right too soon."

Suggested-by: @cdecker
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2018-08-29 06:16:32 +09:30
committed by Christian Decker
parent b270ab02ec
commit e0952ceff2
14 changed files with 101 additions and 87 deletions

View File

@@ -5,6 +5,7 @@
#ifndef LIGHTNING_LIGHTNINGD_JSON_H
#define LIGHTNING_LIGHTNINGD_JSON_H
#include "config.h"
#include <ccan/short_types/short_types.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
@@ -95,6 +96,11 @@ bool json_tok_feerate_style(struct command *cmd, const char *name,
const char *json_feerate_style_name(enum feerate_style style);
/* Extract a feerate with optional style suffix. */
bool json_tok_feerate(struct command *cmd, const char *name,
const char *buffer, const jsmntok_t *tok,
u32 **feerate);
/* '"fieldname" : "1234:5:6"' */
void json_add_short_channel_id(struct json_result *response,
const char *fieldname,