| 151 | } |
| 152 | |
| 153 | static struct onchain_fee *fromwire_onchain_fee(struct onchain_fees *onchain_fees, |
| 154 | const u8 **pptr, size_t *max) |
| 155 | { |
| 156 | const char *acctname; |
| 157 | struct bitcoin_txid txid; |
| 158 | struct amount_msat credit; |
| 159 | struct amount_msat debit; |
| 160 | u64 timestamp; |
| 161 | u32 update_count; |
| 162 | |
| 163 | acctname = fromwire_wirestring(tmpctx, pptr, max); |
| 164 | fromwire_bitcoin_txid(pptr, max, &txid); |
| 165 | credit = fromwire_amount_msat(pptr, max); |
| 166 | debit = fromwire_amount_msat(pptr, max); |
| 167 | timestamp = fromwire_u64(pptr, max); |
| 168 | update_count = fromwire_u32(pptr, max); |
| 169 | if (pptr == NULL) |
| 170 | return NULL; |
| 171 | |
| 172 | return new_onchain_fee(onchain_fees, |
| 173 | take(acctname), &txid, credit, debit, timestamp, |
| 174 | update_count); |
| 175 | } |
| 176 | |
| 177 | static const char **ds_ofee_path(const tal_t *ctx, const char *acctname TAKES) |
| 178 | { |
no test coverage detected