-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix runtime price-setting #19
Conversation
The problem was an old name for the "fee" config value (used to be "price") which was included in a parser if statement which would exclude unrecognized keywords.
ce040fc
to
37c62c1
Compare
@@ -801,7 +801,7 @@ parse_option(int c, gnc_t gnc, void *closure, char *token) | |||
strcmp(token, "diversity") != 0 && | |||
strcmp(token, "diversity-factor") != 0 && | |||
strcmp(token, "smoothing-half-life") != 0 && | |||
strcmp(token, "price") != 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI that's the crucial change, others are just improvements
configuration.c
Outdated
unsigned int i; | ||
c = getword(c, &t, gnc, closure); | ||
if(c < -1) | ||
return c; | ||
errno = 0; | ||
i = strtoul(t, &end, 0); | ||
if(*end != '\0' || errno) { | ||
if(!t || t[0] == '-' || *end != '\0' || errno) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm out of the context but why we're downcasting unsigned long
into unsigned int
? Would it be possible to keep the type?
5d8270c
to
bebc783
Compare
bebc783
to
6bc78ec
Compare
This fixes the "fee" config value
you can set the fee via the socket or a config file like so:
value
has to be within uint32_t bounds.Yes, it was this simple [*]