enable "--threads:on" for tests (#75)

* enable "--threads:on" for tests

* disable Chronicles colours on Windows

* delete forLoopMacros-related config
This commit is contained in:
Ștefan Talpalaru 2019-02-05 18:48:34 +01:00 committed by Jacek Sieka
parent e5d152c6d6
commit 20e02d5615
3 changed files with 10 additions and 7 deletions

View File

@ -55,9 +55,10 @@ p2pProtocol GossipSub(version = 1,
p.state.sentMessages.incl msgId
asyncCheck p.emit(topic, msgId, msg)
let handler = peer.networkState.topicSubscribers.getOrDefault(topic)
if handler != nil:
await handler(msg)
{.gcsafe.}:
let handler = peer.networkState.topicSubscribers.getOrDefault(topic)
if handler != nil:
await handler(msg)
proc subscribeImpl(node: EthereumNode,
topic: string,

View File

@ -1,5 +1,5 @@
# https://github.com/nim-lang/Nim/issues/8691#issuecomment-414662209
# Doesn't work unfortunately
@if nimHasForLoopMacros:
--experimental:forLoopMacros
# https://github.com/nim-lang/Nim/issues/8294#issuecomment-454556051
@if windows:
-d:"chronicles_colors=NoColors"
@end

2
tests/nim.cfg Normal file
View File

@ -0,0 +1,2 @@
--threads:on