Skip to content

Commit

Permalink
feat(mining): add internal-miner feature to docker
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavovalverde committed Oct 2, 2024
1 parent 9b1b06f commit 777b268
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#
# Keep these argument defaults in sync with GitHub vars.RUST_PROD_FEATURES and vars.RUST_TEST_FEATURES
# https://github.com/ZcashFoundation/zebra/settings/variables/actions
ARG FEATURES="default-release-binaries"
ARG FEATURES="default-release-binaries internal-miner"
ARG TEST_FEATURES="lightwalletd-grpc-tests zebra-checkpoints"
ARG EXPERIMENTAL_FEATURES=""

Expand Down
9 changes: 7 additions & 2 deletions docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,15 @@ EOF
fi
fi

if [[ -n "${MINER_ADDRESS}" ]]; then
if [[ " ${FEATURES} " =~ " internal-miner " ]]; then
cat <<EOF >> "${ZEBRA_CONF_PATH}"
[mempool]
debug_enable_at_height = 0
[mining]
miner_address = "${MINER_ADDRESS}"
miner_address = "${MINER_ADDRESS:='t27eWDgjFYJGVXmzrXeVjnb5J3uXDM9xH9v'}"
internal_miner = true
EOF
fi
fi
Expand Down

0 comments on commit 777b268

Please sign in to comment.