From 965c0d42cef8f767f9c9ff33b4e53159b5565323 Mon Sep 17 00:00:00 2001 From: Enrique Lacal Date: Tue, 9 Apr 2024 14:52:27 +0100 Subject: [PATCH] fix token pool creation for 1.3.0 Signed-off-by: Enrique Lacal --- internal/perf/token_pool.go | 7 +++++-- scripts/prep.sh | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/internal/perf/token_pool.go b/internal/perf/token_pool.go index 45d8835..66b3e89 100644 --- a/internal/perf/token_pool.go +++ b/internal/perf/token_pool.go @@ -18,6 +18,7 @@ package perf import ( "errors" + "fmt" "net/url" "github.com/hyperledger/firefly-common/pkg/fftypes" @@ -43,13 +44,15 @@ func (pr *perfRunner) CreateTokenPool() error { if pr.cfg.TokenOptions.Config.PoolBlockNumber != "" { config["blockNumber"] = pr.cfg.TokenOptions.Config.PoolBlockNumber } - fullPath, err := url.JoinPath(pr.client.BaseURL, pr.cfg.FFNamespacePath, "tokens/pools?confirm=true") + fullPath, err := url.JoinPath(pr.client.BaseURL, pr.cfg.FFNamespacePath, "tokens/pools") if err != nil { return err } + + url := fmt.Sprintf("%s?confirm=true&publish=true", fullPath) res, err := pr.client.R(). SetBody(&body). - Post(fullPath) + Post(url) if err != nil || !res.IsSuccess() { return errors.New("Failed to create token pool") diff --git a/scripts/prep.sh b/scripts/prep.sh index fc89d64..efdea55 100755 --- a/scripts/prep.sh +++ b/scripts/prep.sh @@ -80,7 +80,7 @@ printf ${PURPLE}"Deploying custom test contract...\n${NC}" TESTS='{"name": "msg_broadcast", "workers":50},{"name": "msg_private", "workers":50},{"name": "blob_broadcast", "workers":30},{"name": "blob_private", "workers":30}' -if [ "$BLOCKCHAIN_PROVIDER" == "geth" ]; then +if [ "$BLOCKCHAIN_PROVIDER" = "geth" ] || [ "$BLOCKCHAIN_PROVIDER" = "besu" ]; then output=$(${FF_CLI} deploy ethereum $NEW_STACK_NAME ./firefly/test/data/contracts/simplestorage/simple_storage.json | jq -r '.address') prefix='contract address: ' CONTRACT_ADDRESS=${output#"$prefix"}