From 07ac814e57d7d5509a41e9ff63c6350e0863775d Mon Sep 17 00:00:00 2001 From: MiniFrenchBread <103425574+MiniFrenchBread@users.noreply.github.com> Date: Mon, 30 Sep 2024 14:56:38 +0800 Subject: [PATCH] test: use fixed 0g binary (#218) * test: use latest 0g binary * feat: use bug fixed 0g binary --- tests/config/0gchain-init-genesis.sh | 2 +- tests/utility/build_binary.py | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/config/0gchain-init-genesis.sh b/tests/config/0gchain-init-genesis.sh index 855e18e..1ad0f86 100644 --- a/tests/config/0gchain-init-genesis.sh +++ b/tests/config/0gchain-init-genesis.sh @@ -28,7 +28,7 @@ for ((i=0; i<$NUM_NODES; i++)) do TMP_GENESIS=$ROOT_DIR/node$i/config/tmp_genesis.json # Replace stake with neuron - $SED_I 's/stake/ua0gi/g' "$GENESIS" + $SED_I 's/"stake"/"ua0gi"/g' "$GENESIS" # Replace the default evm denom of aphoton with neuron $SED_I 's/aphoton/neuron/g' "$GENESIS" diff --git a/tests/utility/build_binary.py b/tests/utility/build_binary.py index 5152428..c095917 100644 --- a/tests/utility/build_binary.py +++ b/tests/utility/build_binary.py @@ -16,7 +16,6 @@ BSC_BINARY = "geth.exe" if is_windows_platform() else "geth" ZG_BINARY = "0gchaind.exe" if is_windows_platform() else "0gchaind" CLIENT_BINARY = "0g-storage-client.exe" if is_windows_platform() else "0g-storage-client" -ZG_GIT_REV = "7bc25a060fab9c17bc9942b6747cd07a668d3042" # v0.1.0 CLI_GIT_REV = "98d74b7e7e6084fc986cb43ce2c66692dac094a6" @unique @@ -76,8 +75,7 @@ def build_zg(dir: str) -> BuildBinaryResult: dir=dir, binary_name=ZG_BINARY, github_url="https://github.com/0glabs/0g-chain.git", - git_rev=ZG_GIT_REV, - build_cmd="make install; cp $(go env GOPATH)/bin/0gchaind .", + build_cmd="git fetch origin pull/74/head:pr-74; git checkout pr-74; make install; cp $(go env GOPATH)/bin/0gchaind .", compiled_relative_path=[], )