Add dedicated miner role for block production#16
Closed
0xZaddyy wants to merge 2 commits intopayjoin:masterfrom
Closed
Add dedicated miner role for block production#160xZaddyy wants to merge 2 commits intopayjoin:masterfrom
0xZaddyy wants to merge 2 commits intopayjoin:masterfrom
Conversation
Remove 2p payjoin support
27165f3 to
12d475c
Compare
arminsabouri
requested changes
Apr 9, 2026
Comment on lines
+430
to
+439
| // Find the first wallet that is a miner | ||
| let miner = self | ||
| .wallet_data | ||
| .iter() | ||
| .find(|w| w.is_miner) | ||
| .map(|w| w.id) | ||
| .unwrap_or_else(|| { | ||
| // Fallback to wallet 0 if no miner is found | ||
| WalletId(0) | ||
| }); |
Collaborator
There was a problem hiding this comment.
I don't think we need to create a new startegy for miners. That would only be useful if we want to simulate different mining behavior. Instead lets just allocate the first address Addresss(0) to the miner.
Implement `MinerStrategy` to allow wallets that only mine blocks without handling payment obligations
arminsabouri
requested changes
Apr 10, 2026
| coordination_weight = 0.0 | ||
|
|
||
| [[wallet_types]] | ||
| name = "Payjoiner" |
Collaborator
There was a problem hiding this comment.
Why did this change from default -> payjoiner
| #[serde(default)] | ||
| pub script_type: ScriptType, | ||
| #[serde(default)] | ||
| pub is_miner: bool, |
Collaborator
There was a problem hiding this comment.
The latest commit is mainly doing the samething just refactored. did this not work:
. Instead lets just allocate the first address Addresss(0) to the miner.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pr implements a dedicated miner role that allows wallets to focus solely on block production without participating in payment obligations, enabling more realistic network simulations.
closes #15