diff --git a/codex/nat.nim b/codex/nat.nim index 54af777d..0f295be8 100644 --- a/codex/nat.nim +++ b/codex/nat.nim @@ -50,6 +50,8 @@ type NatManager* = ref object threadStarted: bool natCloseChan: Channel[bool] +export natutils + logScope: topics = "nat" diff --git a/codex/node.nim b/codex/node.nim index d1008c01..544e963c 100644 --- a/codex/node.nim +++ b/codex/node.nim @@ -48,7 +48,7 @@ import ./utils/asynciter import ./utils/trackedfutures import ./nat -export logutils +export logutils, nat logScope: topics = "codex node" diff --git a/tests/codex/node/helpers.nim b/tests/codex/node/helpers.nim index a28a1f37..ad49ca29 100644 --- a/tests/codex/node/helpers.nim +++ b/tests/codex/node/helpers.nim @@ -78,6 +78,7 @@ template setupAndTearDown*() {.dirty.} = pendingBlocks: PendingBlocksManager discovery: DiscoveryEngine advertiser: Advertiser + nat: NatManager let path = currentSourcePath().parentDir @@ -112,6 +113,7 @@ template setupAndTearDown*() {.dirty.} = engine = BlockExcEngine.new( localStore, wallet, network, discovery, advertiser, peerStore, pendingBlocks ) + nat = NatManager.new(NatConfig(hasExtIp: false, nat: NatNone)) store = NetworkStore.new(engine, localStore) node = CodexNodeRef.new( switch = switch, @@ -120,6 +122,7 @@ template setupAndTearDown*() {.dirty.} = prover = Prover.none, discovery = blockDiscovery, taskpool = Taskpool.new(), + nat = nat, ) teardown: