-
Notifications
You must be signed in to change notification settings - Fork 100
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
change(chain): Remove Copy
trait impl from Network
#8354
change(chain): Remove Copy
trait impl from Network
#8354
Conversation
…o accept ref to network
…ccept ref to network
…o accept ref to network
….rs to accept ref to network
…pt ref to network
conversion now complete. all tests pass (workspace wide). I'll go through the review now and make the changes requested. Ye i have been worried that its been getting big but now its complete maybe it will be possible? |
all clippy warnings fixed and changes from review applied |
sorry I just saw your comment about linking the commit that addresses a comment. I'll make sure to include this from now on. |
fixed build error (in commit: b09707c) |
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.
Let's merge it!
Thank you for the extensive changes.
Copy
trait impl from Network
Motivation
This PR continues work towards implementing Regtest mode in Zebrad.
Removing Derive(copy) from Network is required for adding a NetworkParameters struct to Testnet. This breaks a lot of functions that take Network as an input. This PR changes these functions to take &Network where possible and clones Network where either not possible or requires significant refactoring to avoid.
Prerequisite of #7968 and part 3 of #7845.
PR Author Checklist
Check before marking the PR as ready for review:
For significant changes:
If a checkbox isn't relevant to the PR, mark it as done.
Solution
Removes Derive(Copy) from Network and any structs that contain Network.
Changes functions that take Network to take &Network where possible and clones network where not.
Testing
Reviewer Checklist
Check before approving the PR:
PR blockers can be dealt with in new tickets or PRs.
And check the PR Author checklist is complete.