mirror of
https://github.com/luxfi/netrunner.git
synced 2026-07-27 00:04:23 +00:00
drop hardcoded /Users/z paths — use $HOME-relative
This commit is contained in:
@@ -36,7 +36,7 @@ func shutdownOnSignal(
|
||||
}
|
||||
|
||||
func createZooTestnetGenesis() ([]byte, error) {
|
||||
data, err := os.ReadFile("/Users/z/work/lux/genesis/configs/zoo-testnet/genesis.json")
|
||||
data, err := os.ReadFile(os.ExpandEnv("$HOME/work/lux/genesis/configs/zoo-testnet/genesis.json"))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -154,7 +154,7 @@ func run(logger log.Logger, binaryPath string) error {
|
||||
netConfig.Genesis = updatedGenesis
|
||||
netConfig.Flags["track-all-chains"] = true
|
||||
|
||||
corethConfig, err := createCorethDebugConfig("/Users/z/work/lux/state/rlp/lux-testnet/lux-testnet-96368.rlp")
|
||||
corethConfig, err := createCorethDebugConfig(os.ExpandEnv("$HOME/work/lux/state/rlp/lux-testnet/lux-testnet-96368.rlp"))
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to create coreth debug config: %w", err)
|
||||
}
|
||||
@@ -219,7 +219,7 @@ func run(logger log.Logger, binaryPath string) error {
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to create zoo testnet genesis: %w", err)
|
||||
}
|
||||
zooCorethConfig, err := createCorethDebugConfig("/Users/z/work/lux/state/rlp/zoo-testnet/zoo-testnet-200201.rlp")
|
||||
zooCorethConfig, err := createCorethDebugConfig(os.ExpandEnv("$HOME/work/lux/state/rlp/zoo-testnet/zoo-testnet-200201.rlp"))
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to create zoo testnet coreth config: %w", err)
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
luxdBinaryPath = "/Users/z/go/bin/luxd"
|
||||
luxdBinaryPath = os.ExpandEnv("$HOME/go/bin/luxd")
|
||||
healthyTimeout = 3 * time.Minute
|
||||
mainnetNetworkID = uint32(96369)
|
||||
)
|
||||
|
||||
@@ -43,7 +43,7 @@ func newConsensusTestEnv(t *testing.T) *consensusTestEnv {
|
||||
|
||||
luxdPath := os.Getenv("LUXD_PATH")
|
||||
if luxdPath == "" {
|
||||
luxdPath = "/Users/z/work/lux/node/build/luxd"
|
||||
luxdPath = os.ExpandEnv("$HOME/work/lux/node/build/luxd")
|
||||
}
|
||||
|
||||
net, err := local.NewDefaultNetwork(logger, luxdPath, true)
|
||||
|
||||
@@ -75,7 +75,7 @@ func newDEXTestEnv(t *testing.T) *dexTestEnv {
|
||||
|
||||
luxdPath := os.Getenv("LUXD_PATH")
|
||||
if luxdPath == "" {
|
||||
luxdPath = "/Users/z/work/lux/node/build/luxd"
|
||||
luxdPath = os.ExpandEnv("$HOME/work/lux/node/build/luxd")
|
||||
}
|
||||
|
||||
net, err := local.NewDefaultNetwork(logger, luxdPath, true)
|
||||
|
||||
Reference in New Issue
Block a user