Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix token pool creation for 1.3.0 #79

Merged
merged 1 commit into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions internal/perf/token_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package perf

import (
"errors"
"fmt"
"net/url"

"github.com/hyperledger/firefly-common/pkg/fftypes"
Expand All @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion scripts/prep.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"}
Expand Down
Loading