| 558 | } |
| 559 | |
| 560 | struct amount_sat amount_tx_fee(u32 fee_per_kw, size_t weight) |
| 561 | { |
| 562 | struct amount_sat fee; |
| 563 | |
| 564 | /* If this overflows, weight must be > 2^32, which is not a real tx */ |
| 565 | assert(!mul_overflows_u64(fee_per_kw, weight)); |
| 566 | fee.satoshis = (u64)fee_per_kw * weight / 1000; |
| 567 | |
| 568 | return fee; |
| 569 | } |
| 570 | |
| 571 | bool amount_asset_is_main(struct amount_asset *amount) |
| 572 | { |
no test coverage detected