diff --git a/tests/integration/multinodes.nim b/tests/integration/multinodes.nim index a818551e..c457e152 100644 --- a/tests/integration/multinodes.nim +++ b/tests/integration/multinodes.nim @@ -15,11 +15,11 @@ template multinodesuite*(name: string, startNodes: StartNodes, debugNodes: DebugNodes, body: untyped) = if (debugNodes.client or debugNodes.provider) and - (enabledLogLevel > LogLevel.DEBUG or + (enabledLogLevel > LogLevel.TRACE or enabledLogLevel == LogLevel.NONE): echo "" echo "More test debug logging is available by running the tests with " & - "'-d:chronicles_log_level=DEBUG " & + "'-d:chronicles_log_level=TRACE " & "-d:chronicles_default_output_device=stdout " & "-d:chronicles_sinks=textlines'" echo "" @@ -46,7 +46,7 @@ template multinodesuite*(name: string, "--disc-port=" & $(8090 + index), "--eth-account=" & $accounts[index]] .concat(addlOptions) - if debug: options.add "--log-level=INFO;DEBUG: " & debugNodes.topics + if debug: options.add "--log-level=INFO;TRACE: " & debugNodes.topics let node = startNode(options, debug = debug) (node, datadir, accounts[index]) diff --git a/tests/integration/nodes.nim b/tests/integration/nodes.nim index 2ce69cb2..f9a282b7 100644 --- a/tests/integration/nodes.nim +++ b/tests/integration/nodes.nim @@ -51,7 +51,7 @@ proc init*(_: type StartNodes, proc init*(_: type DebugNodes, client, provider, validator: bool, - topics: string = "validation,proving"): DebugNodes = + topics: string = "validator,proving"): DebugNodes = DebugNodes(client: client, provider: provider, validator: validator, topics: topics) diff --git a/tests/integration/testproofs.nim b/tests/integration/testproofs.nim index 7f4abe3b..36afc40b 100644 --- a/tests/integration/testproofs.nim +++ b/tests/integration/testproofs.nim @@ -126,9 +126,6 @@ multinodesuite "Simulate invalid proofs", let config = await marketplace.config() period = config.proofs.period.truncate(uint64) periodDowntime = config.proofs.downtime - await provider.getSigner(accounts[0]).mint() - await provider.getSigner(accounts[2]).mint() - await provider.getSigner(accounts[2]).deposit() proofSubmitted = newFuture[void]("proofSubmitted") proc onProofSubmitted(event: ProofSubmitted) = submitted.add(event.proof) @@ -140,6 +137,11 @@ multinodesuite "Simulate invalid proofs", downtime = @[] periodicity = Periodicity(seconds: period.u256) + # Our Hardhat configuration does use automine, which means that time tracked by `provider.currentTime()` is not + # advanced until blocks are mined and that happens only when transaction is submitted. + # As we use in tests provider.currentTime() which uses block timestamp this can lead to synchronization issues. + await provider.advanceTime(1.u256) + teardown: await subscription.unsubscribe()