core-lightning/plugins/bkpr/onchain_fee.c
Rusty Russell 9366e6b39f cleanup: rename json_add_amount_msat_only to json_add_amount_msat
Now there's no compat variant, we can rename this function.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-03-18 15:55:49 +10:30

21 lines
623 B
C

#include "config.h"
#include <common/json_stream.h>
#include <plugins/bkpr/onchain_fee.h>
void json_add_onchain_fee(struct json_stream *out,
struct onchain_fee *fee)
{
json_object_start(out, NULL);
json_add_string(out, "account", fee->acct_name);
json_add_string(out, "type", "onchain_fee");
json_add_string(out, "tag", "onchain_fee");
json_add_amount_msat(out, "credit_msat", fee->credit);
json_add_amount_msat(out, "debit_msat", fee->debit);
json_add_string(out, "currency", fee->currency);
json_add_u64(out, "timestamp", fee->timestamp);
json_add_txid(out, "txid", &fee->txid);
json_object_end(out);
}