-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
allow private peers param #580
Changes from 2 commits
a495554
be351e5
b24e36e
df70a3a
d411570
0bc9e79
ff20b7e
25d5c7f
5159047
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -81,6 +81,7 @@ func NewNetwork( | |
trackedSubnets set.Set[ids.ID], | ||
manuallyTrackedPeers []info.Peer, | ||
cfg Config, | ||
allowPrivateIPs bool, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can add a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||
) (AppRequestNetwork, error) { | ||
logger := logging.NewLogger( | ||
"p2p-network", | ||
|
@@ -127,7 +128,19 @@ func NewNetwork( | |
validatorClient := validators.NewCanonicalValidatorClient(logger, cfg.GetPChainAPI()) | ||
manager := snowVdrs.NewManager() | ||
|
||
testNetwork, err := network.NewTestNetwork(logger, networkID, manager, trackedSubnets, handler) | ||
testNetworkRegisterer := prometheus.NewRegistry() | ||
|
||
testNetworkConfig, err := network.NewTestNetworkConfig(testNetworkRegisterer, networkID, manager, trackedSubnets) | ||
if err != nil { | ||
logger.Error( | ||
"Failed to create test network config", | ||
zap.Error(err), | ||
) | ||
return nil, err | ||
} | ||
testNetworkConfig.AllowPrivateIPs = allowPrivateIPs | ||
|
||
testNetwork, err := network.NewTestNetwork(logger, testNetworkRegisterer, testNetworkConfig, handler) | ||
if err != nil { | ||
logger.Error( | ||
"Failed to create test network", | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's hold off on merging until #580 is merged to
master
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ava-labs/avalanchego#3573 has been merged