mirror of
https://github.com/luxfi/netrunner.git
synced 2026-07-27 00:04:23 +00:00
netrunner: refresh go.mod + gitignore .bak files
go.mod dep refresh, network.go updates, *.bak in gitignore.
This commit is contained in:
@@ -39,3 +39,4 @@ l2chains
|
||||
netrunner
|
||||
magic.mgc
|
||||
network/default/
|
||||
*.bak
|
||||
|
||||
@@ -26,7 +26,7 @@ require (
|
||||
github.com/luxfi/metric v1.5.1
|
||||
github.com/luxfi/node v1.26.26
|
||||
github.com/luxfi/p2p v1.19.2
|
||||
github.com/luxfi/proto v1.0.0
|
||||
github.com/luxfi/protocol v0.0.4
|
||||
github.com/luxfi/sdk v1.16.60
|
||||
github.com/luxfi/utxo v0.3.0
|
||||
github.com/luxfi/validators v1.2.0
|
||||
@@ -219,4 +219,3 @@ require (
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20260401024825-9d38bb4040a9 // indirect
|
||||
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
|
||||
)
|
||||
|
||||
|
||||
+12
-3
@@ -579,12 +579,12 @@ func (ln *localNetwork) loadConfig(ctx context.Context, networkConfig network.Co
|
||||
return fmt.Errorf("error adding node %s: %w", nodeConfig.Name, err)
|
||||
}
|
||||
|
||||
// For beacon nodes (except the last one), wait for P2P port to be ready
|
||||
// before starting subsequent nodes. This ensures bootstrap IPs are reachable.
|
||||
// Beacons must accept TCP on their staking port before any other
|
||||
// node tries to dial them — bootstrap IPs are otherwise unreachable.
|
||||
if nodeConfig.IsBeacon && i < len(nodeConfigs)-1 {
|
||||
ln.logger.Info("waiting for beacon node P2P port to be ready", log.String("node", nodeConfig.Name))
|
||||
if err := ln.waitForP2PPort(ctx, node); err != nil {
|
||||
ln.logger.Warn("beacon node P2P port not ready, continuing anyway", log.String("node", nodeConfig.Name), log.Err(err))
|
||||
return fmt.Errorf("beacon %s P2P port not ready: %w", nodeConfig.Name, err)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1392,6 +1392,15 @@ func (ln *localNetwork) getNodeSemVer(nodeConfig node.Config) (string, error) {
|
||||
// ensure flags are compatible with the running node version
|
||||
func getFlagsForLuxdVersion(luxdVersion string, givenFlags map[string]string) map[string]string {
|
||||
flags := maps.Clone(givenFlags)
|
||||
// Empty/unparseable version means "we couldn't detect" — assume the
|
||||
// luxd binary is current (no downgrade needed). Previously this
|
||||
// branch incorrectly compared "" < "v1.9.6" → -1, which caused the
|
||||
// downgrade table to fire on every modern luxd and inject the
|
||||
// deprecated --build-dir / --whitelisted-subnets flags. Modern
|
||||
// luxd rejects those flags with "unknown flag" and node1 exits 1.
|
||||
if luxdVersion == "" || !semver.IsValid(luxdVersion) {
|
||||
return flags
|
||||
}
|
||||
for _, deprecatedFlagInfo := range deprecatedFlagsSupport {
|
||||
if semver.Compare(luxdVersion, deprecatedFlagInfo.Version) < 0 {
|
||||
if v, ok := flags[deprecatedFlagInfo.NewName]; ok {
|
||||
|
||||
Reference in New Issue
Block a user