Skip to content
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

Reward tracking #1653

Merged
merged 5 commits into from
May 2, 2024
Merged

Reward tracking #1653

merged 5 commits into from
May 2, 2024

Conversation

maqi
Copy link
Member

@maqi maqi commented Apr 30, 2024

Description

reviewpad:summary

@@ -105,11 +105,23 @@
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

Suspicious comment
@maqi maqi force-pushed the reward_tracking branch 3 times, most recently from cd567d7 to b917a15 Compare May 1, 2024 12:09
@maqi maqi removed the DoNotMerge label May 1, 2024
@maqi maqi changed the title WIP Reward tracking Reward tracking May 1, 2024
sn_transfers/src/cashnotes.rs Outdated Show resolved Hide resolved
Comment on lines +25 to +40
#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub struct SpendDagAddress {
address: SpendAddress,
purpose: String,
}

impl std::fmt::Debug for SpendDagAddress {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> std::fmt::Result {
write!(
f,
"address: {}\npurpose: {}",
&self.address.to_hex()[0..6],
self.purpose
)
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub struct SpendDagAddress {
address: SpendAddress,
purpose: String,
}
impl std::fmt::Debug for SpendDagAddress {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> std::fmt::Result {
write!(
f,
"address: {}\npurpose: {}",
&self.address.to_hex()[0..6],
self.purpose
)
}
}
#[derive(Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub struct SpendDagAddress {
address: SpendAddress,
purpose: String,
}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the default Debug doesn't have the line break, which gives a better output in the diagraph.
hence it has to be individually implemented.

@maqi maqi added this pull request to the merge queue May 2, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks May 2, 2024
@maqi maqi force-pushed the reward_tracking branch from 6788ba5 to 9a7fe06 Compare May 2, 2024 11:25
@maqi maqi enabled auto-merge May 2, 2024 11:25
@maqi maqi added this pull request to the merge queue May 2, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 2, 2024
@maqi maqi added this pull request to the merge queue May 2, 2024
Merged via the queue into maidsafe:main with commit d884f9d May 2, 2024
35 checks passed
@maqi maqi deleted the reward_tracking branch May 2, 2024 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants