Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
zjb0807 committed Sep 27, 2024
1 parent 3aeb62b commit 45003f7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/chopsticks/src/schema/parse.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ describe('Existing configs', async () => {

describe('Parsed options', () => {
const defaults = {
addr: 'localhost',
port: 8000,
'build-block-mode': 'Batch',
}
Expand Down
5 changes: 3 additions & 2 deletions packages/chopsticks/src/setup-with-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ import { setupContext } from './context.js'
export const setupWithServer = async (argv: Config) => {
const context = await setupContext(argv)

const { close, port: listenPort } = await createServer(handler(context), argv.addr, argv.port)
const addr = argv.addr ?? 'localhost'
const { close, port: listenPort } = await createServer(handler(context), addr, argv.port)

defaultLogger.info(`${await context.chain.api.getSystemChain()} RPC listening on ${argv.addr}:${listenPort}`)
defaultLogger.info(`${await context.chain.api.getSystemChain()} RPC listening on ${addr}:${listenPort}`)

return {
...context,
Expand Down

0 comments on commit 45003f7

Please sign in to comment.