Skip to content

Commit

Permalink
reexport public types
Browse files Browse the repository at this point in the history
  • Loading branch information
arnetheduck committed Mar 6, 2023
1 parent c1a3bd8 commit 72a5791
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion libp2p/protocols/pubsub/floodsub.nim
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ when (NimMajor, NimMinor) < (1, 4):
else:
{.push raises: [].}

import std/[sequtils, sets, hashes, tables]
import std/[sets, hashes, tables]
import chronos, chronicles, metrics
import ./pubsub,
./pubsubpeer,
Expand Down
2 changes: 1 addition & 1 deletion libp2p/protocols/pubsub/gossipsub.nim
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ when (NimMajor, NimMinor) < (1, 4):
else:
{.push raises: [].}

import std/[tables, sets, options, sequtils]
import std/[sets, sequtils]
import chronos, chronicles, metrics
import ./pubsub,
./floodsub,
Expand Down
4 changes: 3 additions & 1 deletion libp2p/protocols/pubsub/gossipsub/types.nim
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@ else:
{.push raises: [].}

import chronos
import std/[tables, sets]
import std/[options, tables, sets]
import ".."/[floodsub, peertable, mcache, pubsubpeer]
import "../rpc"/[messages]
import "../../.."/[peerid, multiaddress, utility]

export options, tables, sets

const
GossipSubCodec* = "/meshsub/1.1.0"
GossipSubCodec_10* = "/meshsub/1.0.0"
Expand Down
2 changes: 2 additions & 0 deletions libp2p/protocols/pubsub/peertable.nim
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ else:
import std/[tables, sets]
import ./pubsubpeer, ../../peerid

export tables, sets

type
PeerTable* = Table[string, HashSet[PubSubPeer]] # topic string to peer map

Expand Down
3 changes: 2 additions & 1 deletion libp2p/protocols/pubsub/pubsub.nim
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import metrics
import stew/results
export results

export tables, sets
export PubSubPeer
export PubSubObserver
export protocol
Expand Down Expand Up @@ -118,7 +119,7 @@ type
anonymize*: bool ## if we omit fromPeer and seqno from RPC messages we send
subscriptionValidator*: SubscriptionValidator # callback used to validate subscriptions
topicsHigh*: int ## the maximum number of topics a peer is allowed to subscribe to
maxMessageSize*: int ##\
maxMessageSize*: int ##\
## the maximum raw message size we'll globally allow
## for finer tuning, check message size on topic validator
##
Expand Down

0 comments on commit 72a5791

Please sign in to comment.