-
Notifications
You must be signed in to change notification settings - Fork 62
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
feat(node): make spend and cash_note reason field configurable #1650
Conversation
c39bee9
to
4db5135
Compare
@@ -105,11 +105,13 @@ | |||
let root_dir = std::env::temp_dir(); | |||
trace!("Starting Kad swarm in client mode..{root_dir:?}."); | |||
|
|||
// TODO: shall client bearing owner's discord user name, to be reflected in the cash_notes? |
Check notice
Code scanning / devskim
A "TODO" or similar was left in source code, possibly indicating incomplete functionality Note
a3934b0
to
80db435
Compare
/// Specify the owner(readable discord user name). | ||
#[clap(long)] | ||
owner: Option<String>, |
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.
This is just for a local network and I assue we might need to pass in the onwer
inside the Add
arg to enable this for service nodes.
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.
as discussed, this can be addressed in follow up PR
@@ -286,8 +296,31 @@ pub async fn run_node( | |||
launcher: &dyn Launcher, | |||
rpc_client: &dyn RpcActions, | |||
) -> Result<NodeServiceData> { | |||
let user = match get_username() { |
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.
get_username()
will at most cases return our OS's user account name. We can just use that. I'm not sure if we might ever have a failure here. Also since this is just for a local network, should we want to pass in the owner
via CLI? It is just for testing right?
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 not sure if we might ever have a failure here
If we do have a failure, we can use a default value like "owner" since it is a local network.
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.
as discussed, this can be addressed in follow up PR
/// For what purpose this cash_note was created | ||
pub reason: String, |
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.
This can be removed on a followup PR as discussed.
/// The reason this cash_note created for | ||
/// eg. `store cost pay to...`, `network royalty`, `change to self`, `payment transfer`, ... | ||
pub reason: String, |
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.
This can be removed on a followup PR as discussed.
Description
reviewpad:summary