From 36454b40d57cb699c7879746c6fb1e83e67717e1 Mon Sep 17 00:00:00 2001 From: ITStarMan100 Date: Tue, 10 Sep 2024 01:34:45 +0000 Subject: [PATCH] Added help for setting up Stratum mining (#7584) * Added help for setting up Stratum mining Signed-off-by: ITStarMan100 * removed duplication from help message; fixed spotless Signed-off-by: Sally MacFarlane --------- Signed-off-by: ITStarMan100 Signed-off-by: Sally MacFarlane Co-authored-by: Sally MacFarlane --- besu/src/main/java/org/hyperledger/besu/RunnerBuilder.java | 2 +- .../java/org/hyperledger/besu/cli/options/MiningOptions.java | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/besu/src/main/java/org/hyperledger/besu/RunnerBuilder.java b/besu/src/main/java/org/hyperledger/besu/RunnerBuilder.java index 9eaf254bbfc..39e4356a7f3 100644 --- a/besu/src/main/java/org/hyperledger/besu/RunnerBuilder.java +++ b/besu/src/main/java/org/hyperledger/besu/RunnerBuilder.java @@ -805,7 +805,7 @@ public Runner build() { if (miningParameters.isStratumMiningEnabled()) { if (!(miningCoordinator instanceof PoWMiningCoordinator powMiningCoordinator)) { throw new IllegalArgumentException( - "Stratum server requires an PoWMiningCoordinator not " + "Stratum mining requires the network option(--network) to be set to CLASSIC. Stratum server requires a PoWMiningCoordinator not " + ((miningCoordinator == null) ? "null" : miningCoordinator.getClass().getName())); } stratumServer = diff --git a/besu/src/main/java/org/hyperledger/besu/cli/options/MiningOptions.java b/besu/src/main/java/org/hyperledger/besu/cli/options/MiningOptions.java index ba4d99bc830..a884edfe334 100644 --- a/besu/src/main/java/org/hyperledger/besu/cli/options/MiningOptions.java +++ b/besu/src/main/java/org/hyperledger/besu/cli/options/MiningOptions.java @@ -59,7 +59,10 @@ public class MiningOptions implements CLIOptions { @Option( names = {"--miner-stratum-enabled"}, - description = "Set if node will perform Stratum mining (default: ${DEFAULT-VALUE})") + description = + "Set if node will perform Stratum mining (default: ${DEFAULT-VALUE})." + + " Compatible with Proof of Work (PoW) only." + + " Requires the network option (--network) to be set to CLASSIC.") private Boolean iStratumMiningEnabled = false; @Option(