update to websockets addresses for hardhat connection

Also, catch exceptions on JsonRpcProvider.close, which should not need to be done, as this routine should not raise any exceptions.
This commit is contained in:
Eric 2025-06-04 16:43:54 +10:00
parent 4616c48931
commit aa00566d29
No known key found for this signature in database
2 changed files with 9 additions and 5 deletions

View File

@ -90,7 +90,7 @@ template multinodesuite*(suiteName: string, body: untyped) =
# .withEthProvider("ws://localhost:8545")
# .some,
# ...
var jsonRpcProviderUrl = "http://127.0.0.1:" & $HardhatPort
var jsonRpcProviderUrl = "ws://localhost:" & $HardhatPort
var running {.inject, used.}: seq[RunningNode]
var bootstrapNodes: seq[string]
let starttime = now().format("yyyy-MM-dd'_'HH:mm:ss")
@ -324,7 +324,11 @@ template multinodesuite*(suiteName: string, body: untyped) =
except ProviderError as e:
error "Failed to revert hardhat state during teardown", error = e.msg
await ethProvider.close()
# TODO: JsonRpcProvider.close should NOT raise any exceptions
try:
await ethProvider.close()
except CatchableError:
discard
running = @[]

View File

@ -74,7 +74,7 @@ asyncchecksuite "Command line interface":
let node = await startCodex(
@[
"persistence",
"--eth-provider=" & "http://127.0.0.1:" & $HardhatPort,
"--eth-provider=" & "ws://localhost:" & $HardhatPort,
"--eth-private-key=" & unsafeKeyFile,
]
)
@ -98,7 +98,7 @@ asyncchecksuite "Command line interface":
let node = await startCodex(
@[
"persistence",
"--eth-provider=" & "http://127.0.0.1:" & $HardhatPort,
"--eth-provider=" & "ws://localhost:" & $HardhatPort,
"prover",
marketplaceArg,
"--circom-r1cs=tests/circuits/fixtures/proof_main.r1cs",
@ -111,7 +111,7 @@ asyncchecksuite "Command line interface":
let node = await startCodex(
@[
"persistence",
"--eth-provider=" & "http://127.0.0.1:" & $HardhatPort,
"--eth-provider=" & "ws://localhost:" & $HardhatPort,
"prover",
marketplaceArg,
"--circom-r1cs=tests/circuits/fixtures/proof_main.r1cs",