Skip to content
Closed
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
6 changes: 6 additions & 0 deletions cli/src/commands/test-validator/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ class SetupCommand extends Command {
default: 8784,
exclusive: ["skip-indexer"],
}),
"grpc-port": Flags.integer({
description: "Enable Photon indexer gRPC on this port.",
required: false,
default: 50051,
exclusive: ["skip-indexer"],
}),
"prover-port": Flags.integer({
description: "Enable Light Prover server on this port.",
required: false,
Expand Down
2 changes: 1 addition & 1 deletion cli/src/utils/initTestEnv.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { airdropSol } from "@lightprotocol/stateless.js";
import { getConfig, getPayer, setAnchorProvider, setConfig } from "./utils";
import {
BASE_PATH,
Expand Down Expand Up @@ -131,6 +130,7 @@ export async function initTestEnv({
await startIndexer(
`http://127.0.0.1:${rpcPort}`,
indexerPort,
grpcPort,
checkPhotonVersion,
photonDatabaseUrl,
grpcPort,
Expand Down
4 changes: 4 additions & 0 deletions cli/src/utils/process.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,10 @@ export function spawnBinary(command: string, args: string[] = []) {
stdio: ["ignore", out, err],
shell: false,
detached: true,
env: {
...process.env,
RUST_LOG: process.env.RUST_LOG || "debug",
},
});

spawnedProcess.on("close", async (code) => {
Expand Down
3 changes: 3 additions & 0 deletions cli/src/utils/processPhotonIndexer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ function getPhotonInstallMessage(): string {
export async function startIndexer(
rpcUrl: string,
indexerPort: number,
grpcPort: number = 50051,
checkPhotonVersion: boolean = true,
photonDatabaseUrl?: string,
grpcPort: number = 50051,
Expand All @@ -56,6 +57,8 @@ export async function startIndexer(
const args: string[] = [
"--port",
indexerPort.toString(),
"--grpc-port",
grpcPort.toString(),
"--rpc-url",
rpcUrl,
"--grpc-port",
Expand Down
Loading