Skip to content

Commit

Permalink
fix: change type of config->fee_per_satoshi to uint32
Browse files Browse the repository at this point in the history
This patch will properly set fee_per_satoshi to _unsigned_ integer,
as support for negative fees was removed from overall design.

This change does not break any tests, so I assume its
better this way.
  • Loading branch information
m-schmoock authored and rustyrussell committed Feb 18, 2019
1 parent 21afe1c commit 5c0d658
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lightningd/lightningd.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ struct config {

/* Fee rates. */
u32 fee_base;
s32 fee_per_satoshi;
u32 fee_per_satoshi;

/* How long between changing commit and sending COMMIT message. */
u32 commit_time_ms;
Expand Down
2 changes: 1 addition & 1 deletion lightningd/options.c
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ static void config_register_opts(struct lightningd *ld)
&ld->config.rescan,
"Number of blocks to rescan from the current head, or "
"absolute blockheight if negative");
opt_register_arg("--fee-per-satoshi", opt_set_s32, opt_show_s32,
opt_register_arg("--fee-per-satoshi", opt_set_u32, opt_show_u32,
&ld->config.fee_per_satoshi,
"Microsatoshi fee for every satoshi in HTLC");
opt_register_arg("--addr", opt_add_addr, NULL,
Expand Down

0 comments on commit 5c0d658

Please sign in to comment.