diff --git a/README.md b/README.md index 0cbfcb0f..ba6a8d8b 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ Neptune-core is the reference implementation for the [Neptune](https://neptune.c - Generate a wallet file: `neptune-wallet-gen` - Run neptune-core daemon: `neptune-core` with flags - `--peers [ip_address:port]` to connect to a given peer, for instance `--peers 51.15.139.238:9798` or `--peers 139.162.193.206:9798` or both - - `--mine` to mine, and with `--throttled-mining` to avoid assigning too much CPU power to mining + - `--mine` to mine — if you want to generate testnet coins to test sending and receiving - `--help` to get a list of available command-line arguments ## Dashboard diff --git a/scripts/linux/run-multiple-instances.sh b/scripts/linux/run-multiple-instances.sh index 2c191d4d..8f46d561 100755 --- a/scripts/linux/run-multiple-instances.sh +++ b/scripts/linux/run-multiple-instances.sh @@ -16,13 +16,13 @@ set -e # Exit on first error. export RUST_LOG=debug; -RUST_BACKTRACE=1 XDG_DATA_HOME=~/.local/share/neptune-integration-test/0/ nice -n 18 -- cargo run -- --network regtest --peer-port 29790 --rpc-port 19790 --mine --throttled-mining 2>&1 | tee -a integration_test.log | sed 's/.*neptune_core:\+\(.*\)/I0: \1/g' & +RUST_BACKTRACE=1 XDG_DATA_HOME=~/.local/share/neptune-integration-test/0/ nice -n 18 -- cargo run -- --network regtest --peer-port 29790 --rpc-port 19790 --mine 2>&1 | tee -a integration_test.log | sed 's/.*neptune_core:\+\(.*\)/I0: \1/g' & pid[0]=$! sleep 5s; RUST_BACKTRACE=1 XDG_DATA_HOME=~/.local/share/neptune-integration-test/1/ nice -n 18 -- cargo run -- --network regtest --peer-port 29791 --rpc-port 19791 --peers 127.0.0.1:29790 2>&1 | tee -a integration_test.log | sed 's/.*neptune_core:\+\(.*\)/I1: \1/g' & pid[1]=$! sleep 5s; -RUST_BACKTRACE=1 XDG_DATA_HOME=~/.local/share/neptune-integration-test/2/ nice -n 18 -- cargo run -- --network regtest --peer-port 29792 --rpc-port 19792 --peers 127.0.0.1:29791 --mine --throttled-mining --max-number-of-blocks-before-syncing 1000 2>&1 | tee -a integration_test.log | sed 's/.*neptune_core:\+\(.*\)/I2: \1/g' & +RUST_BACKTRACE=1 XDG_DATA_HOME=~/.local/share/neptune-integration-test/2/ nice -n 18 -- cargo run -- --network regtest --peer-port 29792 --rpc-port 19792 --peers 127.0.0.1:29791 --mine --max-number-of-blocks-before-syncing 1000 2>&1 | tee -a integration_test.log | sed 's/.*neptune_core:\+\(.*\)/I2: \1/g' & pid[2]=$! # Inspired by https://stackoverflow.com/a/52033580/2574407 diff --git a/scripts/linux/run-single-instance.sh b/scripts/linux/run-single-instance.sh index 29b127f7..ce4e0c79 100755 --- a/scripts/linux/run-single-instance.sh +++ b/scripts/linux/run-single-instance.sh @@ -16,7 +16,7 @@ set -e # Exit on first error. export RUST_LOG=debug; -RUST_BACKTRACE=1 XDG_DATA_HOME=~/.local/share/neptune-integration-test/0/ nice -n 18 -- cargo run -- --network regtest --peer-port 29790 --rpc-port 19790 --mine --throttled-mining 2>&1 | tee -a integration_test.log | sed 's/.*neptune_core:\+\(.*\)/I0: \1/g' & +RUST_BACKTRACE=1 XDG_DATA_HOME=~/.local/share/neptune-integration-test/0/ nice -n 18 -- cargo run -- --network regtest --peer-port 29790 --rpc-port 19790 --mine 2>&1 | tee -a integration_test.log | sed 's/.*neptune_core:\+\(.*\)/I0: \1/g' & pid[0]=$! sleep 5s; diff --git a/src/config_models/cli_args.rs b/src/config_models/cli_args.rs index 16179bfd..82164647 100644 --- a/src/config_models/cli_args.rs +++ b/src/config_models/cli_args.rs @@ -51,9 +51,9 @@ pub struct Args { #[clap(long)] pub mine: bool, - /// If mining, restrict CPU time spent in mining thread. Ignored if mine flag not set. + /// If mining, use all available CPU power. Ignored if mine flag not set. #[clap(long)] - pub throttled_mining: bool, + pub unrestricted_mining: bool, /// Prune the mempool when it exceeds this size in RAM. /// diff --git a/src/mine_loop.rs b/src/mine_loop.rs index f6365350..78f0ec83 100644 --- a/src/mine_loop.rs +++ b/src/mine_loop.rs @@ -121,7 +121,7 @@ async fn mine_block( // Mining takes place here while Hash::hash(&block_header) >= threshold { - if state.cli.throttled_mining { + if !state.cli.unrestricted_mining { tokio::time::sleep(Duration::from_millis(100)).await; }