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

PrivKeyPolicy type must not implement Clone or Derive #2241

Open
Alrighttt opened this issue Oct 13, 2024 · 2 comments
Open

PrivKeyPolicy type must not implement Clone or Derive #2241

Alrighttt opened this issue Oct 13, 2024 · 2 comments

Comments

@Alrighttt
Copy link
Member

#[derive(Clone, Debug)]

We should remove Clone and Debug implementations for this type since it handles private keys. There seems to be no instance of using Debug. There are two instances of using Clone which must be refactored:

priv_key_policy: self.priv_key_policy.clone(),

priv_key_policy: self.priv_key_policy.clone(),

@Alrighttt
Copy link
Member Author

We should consider if it makes sense to also remove pub from this type.

@Alrighttt
Copy link
Member Author

This is a more significant refactor than first stated due to the common pattern of cloning the "Coin" structs such as UtxoStandardCoin, EthCoin, ZCoin, etc.

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

No branches or pull requests

1 participant