Merge pull request #143 from status-im/fix-imports

Fix double whisper types export by moving to separate file
This commit is contained in:
kdeme 2019-12-10 06:27:05 -08:00 committed by GitHub
commit 038250b259
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 7 deletions

View File

@ -0,0 +1,17 @@
#
# Waku - Whisper Bridge
# (c) Copyright 2019
# Status Research & Development GmbH
#
# Licensed under either of
# Apache License, version 2.0, (LICENSE-APACHEv2)
# MIT license (LICENSE-MIT)
#
import
eth/p2p,
eth/p2p/rlpx_protocols/waku_protocol,
eth/p2p/rlpx_protocols/whisper_protocol
proc shareMessageQueue*(node: EthereumNode) =
node.protocolState(Waku).queue = node.protocolState(Whisper).queue

View File

@ -38,8 +38,6 @@ import
options, tables, times, chronos, chronicles, options, tables, times, chronos, chronicles,
eth/[keys, async_utils, p2p], whisper/whisper_types eth/[keys, async_utils, p2p], whisper/whisper_types
import eth/p2p/rlpx_protocols/whisper_protocol
export export
whisper_types whisper_types
@ -465,5 +463,3 @@ proc resetMessageQueue*(node: EthereumNode) =
## NOTE: Not something that should be run in normal circumstances. ## NOTE: Not something that should be run in normal circumstances.
node.protocolState(Waku).queue[] = initQueue(defaultQueueCapacity) node.protocolState(Waku).queue[] = initQueue(defaultQueueCapacity)
proc shareMessageQueue*(node: EthereumNode) =
node.protocolState(Waku).queue = node.protocolState(Whisper).queue

View File

@ -9,11 +9,11 @@
import import
sequtils, unittest, tables, chronos, eth/p2p, eth/p2p/peer_pool, sequtils, unittest, tables, chronos, eth/p2p, eth/p2p/peer_pool,
eth/p2p/rlpx_protocols/waku_bridge,
eth/p2p/rlpx_protocols/waku_protocol as waku,
eth/p2p/rlpx_protocols/whisper_protocol as whisper,
./p2p_test_helper ./p2p_test_helper
import eth/p2p/rlpx_protocols/waku_protocol as waku
import eth/p2p/rlpx_protocols/whisper_protocol as whisper
let safeTTL = 5'u32 let safeTTL = 5'u32
let waitInterval = waku.messageInterval + 150.milliseconds let waitInterval = waku.messageInterval + 150.milliseconds