-
Notifications
You must be signed in to change notification settings - Fork 211
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
Make CLI spend e-cash more configurable #3902
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #3902 +/- ##
==========================================
- Coverage 57.13% 57.09% -0.04%
==========================================
Files 193 193
Lines 42861 42897 +36
==========================================
+ Hits 24487 24492 +5
- Misses 18374 18405 +31 ☔ View full report in Codecov by Sentry. |
fedimint-cli/src/client.rs
Outdated
allow_overpay: bool, | ||
/// After how many seconds we will try to reclaim the e-cash if it | ||
/// hasn't been redeemed by the recipient | ||
#[clap(long, default_value_t = 3600)] |
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.
thought: Is this automatic behavior? If so, isn't this a bit low for a default for something that might be passed in a DM or even piece of paper?
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.
Good point, what would you propose? A week?
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.
Sounds reasonable.
BTW. Maybe we should also eprintln!
the deadline to warn/educate the user?
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.
could that be a warn
level log? These are still shown and should be printed to stderr anyway (if not we should fix that).
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.
The way I think about it is: logging is for reporting what the program is doing, while (e)println
for the actual output for the user. Not feeling too strongly about it one way or another.
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.
We need a fourth stream, stdlog! 😆
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.
In the CLI what would trigger this timeout path to be taken? Any other CLI command run after this timeout has passed?
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.
Yep, basically anything that runs the SM executor for long enough. What I like to do to trigger this manually is create a LN invoice I don't intend to pay and then await it. We might want a more general purpose "run executor" command.
9b6f145
to
1843a50
Compare
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.
Requires rebase, but LGTM
Previously the spend command would return the next-higher amount if the exact amount could not be represented with the available denominations.
1843a50
to
868f675
Compare
Fixes #3834