Skip to content

Commit

Permalink
fix: added submit-api-host to api (#120)
Browse files Browse the repository at this point in the history
* fix: added submit-api-host to api

* fix: added submit-api-host to api
  • Loading branch information
Kammerlo authored Apr 11, 2024
1 parent cef1f81 commit 6c5f10d
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 8 deletions.
1 change: 1 addition & 0 deletions .env.IntegrationTest
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ DB_PATH="data"
CARDANO_NODE_HOST="yaci-cli" # Service name in docker-compose or local cardano node
CARDANO_NODE_PORT="9999" # Uncomment if you are using local cardano node
CARDANO_NODE_VERSION="8.9.0"
CARDANO_NODE_SUBMIT_HOST="cardano-submit-api"
NODE_SUBMIT_API_PORT=8090
CARDANO_NODE_SOCKET="./node-ipc"
CARDANO_NODE_DB="node/db"
Expand Down
1 change: 1 addition & 0 deletions .env.docker-compose
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ DB_PATH="data"
CARDANO_NODE_HOST="cardano-node" # Service name in docker-compose or local cardano node
CARDANO_NODE_PORT="3001" # Uncomment if you are using local cardano node
CARDANO_NODE_VERSION="8.9.0"
CARDANO_NODE_SUBMIT_HOST="cardano-submit-api"
NODE_SUBMIT_API_PORT=8090
CARDANO_NODE_SOCKET="./node-ipc"
CARDANO_NODE_DB="./node/db"
Expand Down
1 change: 1 addition & 0 deletions .env.h2
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ SCHEMA=${NETWORK}
CARDANO_NODE_HOST="localhost" # Service name in docker-compose or local cardano node
CARDANO_NODE_PORT=3001 # Uncomment if you are using local cardano node
CARDANO_NODE_VERSION=8.9.0
CARDANO_NODE_SUBMIT_HOST="cardano-submit-api"
NODE_SUBMIT_API_PORT=8090
CARDANO_NODE_SOCKET="./node-ipc"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ public class CardanoServiceImpl implements CardanoService {
private final LedgerDataProviderService ledgerDataProviderService;
@Value("${cardano.rosetta.NODE_SUBMIT_API_PORT}")
private int NODE_SUBMIT_API_PORT;
@Value("${cardano.rosetta.CARDANO_NODE_HOST}")
private String CARDANO_NODE_HOST;
@Value("${cardano.rosetta.CARDANO_NODE_SUBMIT_HOST}")
private String CARDANO_NODE_SUBMIT_HOST;

@Override
public TransactionParsed parseTransaction(NetworkIdentifierType networkIdentifierType,
Expand Down Expand Up @@ -473,7 +473,7 @@ public ProcessOperations convertRosettaOperations(NetworkIdentifierType networkI
*/
@Override
public String submitTransaction(String signedTransaction) throws ApiException {
String submitURL = Constants.PROTOCOL + CARDANO_NODE_HOST + ":" + NODE_SUBMIT_API_PORT
String submitURL = Constants.PROTOCOL + CARDANO_NODE_SUBMIT_HOST + ":" + NODE_SUBMIT_API_PORT
+ Constants.SUBMIT_API_PATH;
log.info("[submitTransaction] About to submit transaction to {}", submitURL);
Request request = null;
Expand Down
2 changes: 1 addition & 1 deletion api/src/main/resources/config/application-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,5 @@ cardano:
DEVKIT_ENABLED: ${DEVKIT_ENABLED:false}
DEVKIT_URL: ${DEVKIT_URL:localhost}
DEVKIT_PORT: ${HOST_N2C_SOCAT_PORT:3333}
CARDANO_NODE_HOST: ${CARDANO_NODE_HOST}
CARDANO_NODE_SUBMIT_HOST: ${CARDANO_NODE_SUBMIT_HOST}
NODE_SUBMIT_API_PORT: ${NODE_SUBMIT_API_PORT}
2 changes: 1 addition & 1 deletion api/src/main/resources/config/application-h2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ cardano:
TOPOLOGY_FILEPATH: ${TOPOLOGY_FILEPATH}
GENESIS_SHELLEY_PATH: ${GENESIS_SHELLEY_PATH}
CARDANO_NODE_VERSION: ${CARDANO_NODE_VERSION}
CARDANO_NODE_HOST: ${CARDANO_NODE_HOST}
CARDANO_NODE_SUBMIT_HOST: ${CARDANO_NODE_SUBMIT_HOST}
NODE_SUBMIT_API_PORT: ${NODE_SUBMIT_API_PORT}
CARDANO_NODE_SOCKET: ${CARDANO_NODE_SOCKET}
# devkit variables
Expand Down
2 changes: 1 addition & 1 deletion api/src/main/resources/config/application-staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ cardano:
${ROSETTA_VERSION}
TOPOLOGY_FILEPATH: ${TOPOLOGY_FILEPATH}
GENESIS_SHELLEY_PATH: ${GENESIS_SHELLEY_PATH}
CARDANO_NODE_HOST: ${CARDANO_NODE_HOST}
CARDANO_NODE_SUBMIT_HOST: ${CARDANO_NODE_SUBMIT_HOST}
NODE_SUBMIT_API_PORT: ${NODE_SUBMIT_API_PORT}
CARDANO_NODE_SOCKET: ${CARDANO_NODE_SOCKET}
# devkit variables
Expand Down
2 changes: 1 addition & 1 deletion api/src/test/resources/application-test-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ cardano:
TOPOLOGY_FILEPATH: ../config/devkit/topology.json
GENESIS_SHELLEY_PATH: ../config/devkit/shelley-genesis.json
CARDANO_NODE_VERSION: "8.9.0"
CARDANO_NODE_HOST: localhost
CARDANO_NODE_SUBMIT_HOST: localhost
NODE_SUBMIT_API_PORT: 8090
CARDANO_NODE_SOCKET: ${CARDANO_NODE_SOCKET:""}
# devkit variables
Expand Down
2 changes: 1 addition & 1 deletion docker-api-indexer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ services:
TOPOLOGY_FILEPATH: ${TOPOLOGY_FILEPATH}
GENESIS_SHELLEY_PATH: ${GENESIS_SHELLEY_PATH}
NODE_SUBMIT_API_PORT: ${NODE_SUBMIT_API_PORT}
CARDANO_NODE_HOST: ${CARDANO_NODE_HOST}
CARDANO_NODE_SUBMIT_HOST: ${CARDANO_NODE_SUBMIT_HOST}
CARDANO_NODE_SOCKET: /ipc/node.socket
DEVKIT_ENABLED: ${DEVKIT_ENABLED}
DEVKIT_URL: ${DEVKIT_URL}
Expand Down

0 comments on commit 6c5f10d

Please sign in to comment.