Skip to content

Commit ab73efa

Browse files
committed
instead of checking ports, check enabled versions
1 parent 6b930d5 commit ab73efa

File tree

1 file changed

+1
-22
lines changed

1 file changed

+1
-22
lines changed

node/node.go

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -349,35 +349,14 @@ func (n *Node) Start(ctx context.Context) error {
349349

350350
n.CurrentSocket = socket
351351
// Start the Node IP updater only if the PUBLIC_IP_PROVIDER is greater than 0.
352-
if n.Config.PubIPCheckInterval > 0 && n.allPortsConfigured() {
352+
if n.Config.PubIPCheckInterval > 0 && n.Config.EnableV1 && n.Config.EnableV2 {
353353
go n.checkRegisteredNodeIpOnChain(ctx)
354354
go n.checkCurrentNodeIp(ctx)
355355
}
356356

357357
return nil
358358
}
359359

360-
// allPortsConfigured checks if all the ports are configured in the config.
361-
func (n *Node) allPortsConfigured() bool {
362-
if err := core.ValidatePort(n.Config.DispersalPort); err != nil {
363-
return false
364-
}
365-
366-
if err := core.ValidatePort(n.Config.V2DispersalPort); err != nil {
367-
return false
368-
}
369-
370-
if err := core.ValidatePort(n.Config.RetrievalPort); err != nil {
371-
return false
372-
}
373-
374-
if err := core.ValidatePort(n.Config.V2RetrievalPort); err != nil {
375-
return false
376-
}
377-
378-
return true
379-
}
380-
381360
// The expireLoop is a loop that is run once per configured second(s) while the node
382361
// is running. It scans for expired batches and removes them from the local database.
383362
func (n *Node) expireLoop() {

0 commit comments

Comments
 (0)