diff options
Diffstat (limited to 'netdeploy/network.go')
-rw-r--r-- | netdeploy/network.go | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/netdeploy/network.go b/netdeploy/network.go index 4e86bd831..d5e4f522e 100644 --- a/netdeploy/network.go +++ b/netdeploy/network.go @@ -1,4 +1,4 @@ -// Copyright (C) 2019-2023 Algorand, Inc. +// Copyright (C) 2019-2024 Algorand, Inc. // This file is part of go-algorand // // go-algorand is free software: you can redistribute it and/or modify @@ -169,6 +169,16 @@ func (n Network) PrimaryDataDir() string { panic(fmt.Errorf("neither relay directories nor node directories are defined for the network")) } +// RelayDataDirs returns an array of relay data directories (not the nodes) +func (n Network) RelayDataDirs() []string { + var directories []string + for _, dir := range n.cfg.RelayDirs { + directories = append(directories, n.getNodeFullPath(dir)) + } + sort.Strings(directories) + return directories +} + // NodeDataDirs returns an array of node data directories (not the relays) func (n Network) NodeDataDirs() []string { var directories []string |