| 192 | } |
| 193 | |
| 194 | void json_add_onchain_fee(struct json_stream *out, |
| 195 | const struct bkpr *bkpr, |
| 196 | const struct onchain_fee *fee) |
| 197 | { |
| 198 | json_object_start(out, NULL); |
| 199 | json_add_string(out, "account", fee->acct_name); |
| 200 | json_add_string(out, "type", "onchain_fee"); |
| 201 | json_add_string(out, "tag", "onchain_fee"); |
| 202 | json_add_amount_msat(out, "credit_msat", fee->credit); |
| 203 | json_add_amount_msat(out, "debit_msat", fee->debit); |
| 204 | json_add_string(out, "currency", chainparams->lightning_hrp); |
| 205 | json_add_currencyrate(out, "currencyrate", bkpr, fee->timestamp); |
| 206 | json_add_u64(out, "timestamp", fee->timestamp); |
| 207 | json_add_txid(out, "txid", &fee->txid); |
| 208 | json_object_end(out); |
| 209 | } |
| 210 | |
| 211 | /* Get all onchain_fee for this account */ |
| 212 | struct onchain_fee **account_get_chain_fees(const tal_t *ctx, |
no test coverage detected