Skip to content

Commit

Permalink
Merge branch 'development' into core-covenants-initial-impl
Browse files Browse the repository at this point in the history
  • Loading branch information
sdbondi authored Dec 16, 2021
2 parents cf0a720 + 6bbb3e3 commit 483405a
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 9 deletions.
10 changes: 10 additions & 0 deletions applications/tari_mining_node/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,16 @@ async fn main_inner() -> Result<(), ExitCodes> {
config.mining_worker_name = global.mining_worker_name.clone();
config.mining_wallet_address = global.mining_wallet_address.clone();
config.mining_pool_address = global.mining_pool_address.clone();
if let Some(base_node_config) = global.base_node_config {
if let Some(grpc_address) = base_node_config.grpc_address {
config.base_node_addr = grpc_address.clone();
}
}
if let Some(wallet_config) = global.wallet_config {
if let Some(grpc_address) = wallet_config.grpc_address {
config.wallet_addr = grpc_address.clone();
}
}
debug!(target: LOG_TARGET_FILE, "{:?}", bootstrap);
debug!(target: LOG_TARGET_FILE, "{:?}", config);

Expand Down
5 changes: 5 additions & 0 deletions common/config/presets/merge_mining_proxy.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,8 @@ monerod_password = ""
# or not. If merge mining starts before the base node has achieved initial sync, those Tari mined blocks will not be
# accepted. (Default value = true; will wait for base node initial sync).
#wait_for_initial_sync_at_startup = true

[merge_mining_proxy]
monerod_use_auth = false
monerod_username = ""
monerod_password = ""
8 changes: 6 additions & 2 deletions common/src/configuration/global.rs
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,9 @@ fn convert_node_config(

bn_config.grpc_address = if grpc_enabled {
let key = "base_node.grpc_address";
let addr = cfg.get_str(key).unwrap_or_else(|_| "/tcp/127.0.0.1/18142".to_string());
let addr = cfg
.get_str(key)
.unwrap_or_else(|_| "/ip4/127.0.0.1/tcp/18142".to_string());

let grpc_address = addr
.parse::<Multiaddr>()
Expand All @@ -354,7 +356,9 @@ fn convert_node_config(

config.grpc_address = if grpc_enabled {
let key = "wallet.grpc_address";
let addr = cfg.get_str(key).unwrap_or_else(|_| "/tcp/127.0.0.1/18143".to_string());
let addr = cfg
.get_str(key)
.unwrap_or_else(|_| "/ip4/127.0.0.1/tcp/18143".to_string());

let grpc_address = addr
.parse::<Multiaddr>()
Expand Down
4 changes: 2 additions & 2 deletions common/src/configuration/validator_node_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ impl ValidatorNodeConfig {
pub fn convert_if_present(cfg: Config) -> Result<Option<ValidatorNodeConfig>, ConfigurationError> {
let section: Self = match cfg.get("validator_node") {
Ok(s) => s,
Err(e) => {
dbg!(e);
Err(_e) => {
// dbg!(e);
return Ok(None);
},
};
Expand Down
2 changes: 1 addition & 1 deletion integration_tests/features/support/validator_node_steps.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
// USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

const { When } = require("cucumber");
const { When } = require("@cucumber/cucumber");
// const expect = require("chai").expect;
// const { sleep, waitForIterate } = require("../../helpers/util");

Expand Down
8 changes: 4 additions & 4 deletions integration_tests/helpers/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,11 @@ function createEnv(
const network =
options && options.network ? options.network.toUpperCase() : "LOCALNET";
const configEnvs = {
[`TARI_BASE_NODE__${network}__GRPC_BASE_NODE_ADDRESS`]: `${baseNodeGrpcAddress}:${baseNodeGrpcPort}`,
[`TARI_WALLET__GRPC_ADDRESS`]: `${walletGrpcAddress}:${walletGrpcPort}`,
[`TARI_BASE_NODE__GRPC_ADDRESS`]: `/ip4/${baseNodeGrpcAddress}/tcp/${baseNodeGrpcPort}`,
[`TARI_WALLET__GRPC_ADDRESS`]: `/ip4/${walletGrpcAddress}/tcp/${walletGrpcPort}`,

["TARI_MERGE_MINING_PROXY__BASE_NODE_GRPC_ADDRESS"]: `${baseNodeGrpcAddress}:${baseNodeGrpcPort}`,
["TARI_MERGE_MINING_PROXY__WALLET_GRPC_ADDRESS"]: `${walletGrpcAddress}:${walletGrpcPort}`,
["TARI_MERGE_MINING_PROXY__BASE_NODE_GRPC_ADDRESS"]: `/ip4/${baseNodeGrpcAddress}/tcp/${baseNodeGrpcPort}`,
["TARI_MERGE_MINING_PROXY__WALLET_GRPC_ADDRESS"]: `/ip4/${walletGrpcAddress}/tcp/${walletGrpcPort}`,
[`TARI_BASE_NODE__${network}__BASE_NODE_IDENTITY_FILE`]: `${nodeFile}`,

[`TARI_BASE_NODE__${network}__TRANSPORT`]: "tcp",
Expand Down

0 comments on commit 483405a

Please sign in to comment.