@ -909,7 +909,7 @@ public class BesuCommand implements DefaultCommandValues, Runnable {
@Option(
names={"--target-gas-limit"},
description=
"Sets target gas limit per block. If set each blocks gas limit will approach this setting over time if the current gas limit is different.")
"Sets target gas limit per block. If set each block's gas limit will approach this setting over time if the current gas limit is different.")
privatefinalLongtargetGasLimit=null;
@Option(
@ -1314,13 +1314,13 @@ public class BesuCommand implements DefaultCommandValues, Runnable {
if(isMiningEnabled&&coinbase==null){
thrownewParameterException(
this.commandLine,
"Unable to mine without a valid coinbase. Either disable mining (remove --miner-enabled)"
"Unable to mine without a valid coinbase. Either disable mining (remove --miner-enabled)"
+"or specify the beneficiary of mining (via --miner-coinbase <Address>)");
}
if(!isMiningEnabled&&iStratumMiningEnabled){
thrownewParameterException(
this.commandLine,
"Unable to mine with Stratum if mining is disabled. Either disable Stratum mining (remove --miner-stratum-enabled)"
"Unable to mine with Stratum if mining is disabled. Either disable Stratum mining (remove --miner-stratum-enabled)"
+"or specify mining is enabled (--miner-enabled)");
}
}
@ -1882,6 +1882,16 @@ public class BesuCommand implements DefaultCommandValues, Runnable {
thrownewParameterException(
commandLine,"Please specify Enclave public key file path to enable privacy");
}
if(Wei.ZERO.compareTo(minTransactionGasPrice)<0){
// if gas is required, cannot use random keys to sign private tx
// ie --privacy-marker-transaction-signing-key-file must be set
if(privacyMarkerTransactionSigningKeyPath==null){
thrownewParameterException(
commandLine,
"Not a free gas network. --privacy-marker-transaction-signing-key-file must be specified and must be a funded account. Private transactions cannot be signed by random (non-funded) accounts in paid gas networks");
@ -2622,7 +2627,7 @@ public class BesuCommandTest extends CommandTestAbstract {
assertThat(commandOutput.toString()).isEmpty();
assertThat(commandErrorOutput.toString())
.startsWith(
"Unable to mine with Stratum if mining is disabled. Either disable Stratum mining (remove --miner-stratum-enabled)or specify mining is enabled (--miner-enabled)");
"Unable to mine with Stratum if mining is disabled. Either disable Stratum mining (remove --miner-stratum-enabled)or specify mining is enabled (--miner-enabled)");
}
@Test
@ -2912,7 +2917,9 @@ public class BesuCommandTest extends CommandTestAbstract {
"--privacy-url",
ENCLAVE_URI,
"--privacy-public-key-file",
configFile.getPath());
configFile.getPath(),
"--min-gas-price",
"0");
finalArgumentCaptor<PrivacyParameters>enclaveArg=
ArgumentCaptor.forClass(PrivacyParameters.class);
@ -2982,7 +2989,9 @@ public class BesuCommandTest extends CommandTestAbstract {