Skip to content

Commit

Permalink
test: debug go ver for deploy-contract, fix lint checker
Browse files Browse the repository at this point in the history
  • Loading branch information
dudong2 committed Nov 29, 2023
1 parent 91c9611 commit d72d2b5
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ $(STATIK):
contract-tools:
ifeq (, $(shell which stringer))
@echo "Installing stringer..."
@echo "$(go version)"
@go get golang.org/x/tools/cmd/stringer
else
@echo "stringer already installed; skipping..."
Expand Down
2 changes: 1 addition & 1 deletion proto/ethermint/feemarket/v1/feemarket.proto
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
syntax = "proto3";
package ethermint.feemarket.v1;

import "gogoproto/gogo.proto";
import "cosmos_proto/cosmos.proto";
import "gogoproto/gogo.proto";

option go_package = "github.com/evmos/ethermint/x/feemarket/types";

Expand Down
10 changes: 5 additions & 5 deletions scripts/proto-tools-installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ esac

TEMPDIR="$(mktemp -d)"

trap "rm -rvf '${TEMPDIR}'" EXIT
trap 'rm -rvf ${TEMPDIR}' EXIT

f_print_installing_with_padding() {
printf "Installing %30s ..." "$1" >&2
Expand Down Expand Up @@ -67,8 +67,8 @@ f_install_protoc() {

pushd "${TEMPDIR}" >/dev/null
curl -o "${PROTOC_ZIP}" -sSL "https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/${PROTOC_ZIP}"
unzip -q -o ${PROTOC_ZIP} -d "${DESTDIR}"/${PREFIX} bin/protoc; \
unzip -q -o ${PROTOC_ZIP} -d "${DESTDIR}"/${PREFIX} 'include/*'; \
unzip -q -o ${PROTOC_ZIP} -d "${DESTDIR}"/"${PREFIX}" bin/protoc; \
unzip -q -o ${PROTOC_ZIP} -d "${DESTDIR}"/"${PREFIX}" 'include/*'; \
rm -f ${PROTOC_ZIP}
popd >/dev/null
f_print_done
Expand Down Expand Up @@ -133,10 +133,10 @@ f_install_clang_format() {
fi
;;
Darwin)
echo "\tRun: brew install clang-format" >&2
printf "\tRun: brew install clang-format" >&2
;;
*)
echo "\tunknown operating system. Skipping." >&2
printf "\tunknown operating system. Skipping." >&2
esac
}

Expand Down
8 changes: 4 additions & 4 deletions tests/integration_tests/test_grpc_only.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,26 +108,26 @@ def expect_cb(rsp):
wait_for_port(grpc_port)
wait_for_port(api_port)

def expect_cb(rsp):
def expect_cb_internal1(rsp):
assert rsp["code"] != 0, str(rsp)
return "validator does not exist" in rsp["message"]

# it don't works without proposer address neither
grpc_eth_call(api_port, msg, expect_cb, chain_id=9000)
grpc_eth_call(api_port, msg, expect_cb_internal1, chain_id=9000)

# pass the first validator's consensus address to grpc query
addr = custom_ethermint.cosmos_cli(0).consensus_address()
cons_addr = decode_bech32(addr)

def expect_cb(rsp):
def expect_cb_internal2(rsp):
ret = base64.b64decode(rsp["ret"].encode())
return "code" not in rsp and 100 == int.from_bytes(ret, "big")

# should work with both chain_id and proposer_address set
grpc_eth_call(
api_port,
msg,
expect_cb,
expect_cb_internal2,
chain_id=100,
proposer_address=base64.b64encode(cons_addr).decode(),
)
Expand Down

0 comments on commit d72d2b5

Please sign in to comment.