bitcoin/feerate: new exposure for feerate parsing outside lightningd.

This exposes the numeric part of param_feerate() as param_feerate_val().

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2020-07-08 06:20:21 +09:30
committed by Christian Decker
parent af4955c28e
commit a9427f1a8d
29 changed files with 121 additions and 147 deletions

View File

@@ -33,6 +33,11 @@
*/
#define FEERATE_FLOOR 253
enum feerate_style {
FEERATE_PER_KSIPA,
FEERATE_PER_KBYTE
};
static inline u32 feerate_floor(void)
{
/* Assert that bitcoind will see this as above minRelayTxFee */
@@ -47,4 +52,9 @@ static inline u32 feerate_floor(void)
return FEERATE_FLOOR;
}
u32 feerate_from_style(u32 feerate, enum feerate_style style);
u32 feerate_to_style(u32 feerate_perkw, enum feerate_style style);
const char *feerate_style_name(enum feerate_style style);
#endif /* LIGHTNING_BITCOIN_FEERATE_H */