mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-05-28 17:56:50 +00:00

* [NOD-102] Change mining simulator to work with cli arguments and add DisableTLS option * [NOD-102] Add config.go * [NOD-102] Change config missing aruments errors
23 lines
363 B
Go
23 lines
363 B
Go
package main
|
|
|
|
import (
|
|
"bufio"
|
|
"os"
|
|
)
|
|
|
|
func getAddressList(cfg *config) ([]string, error) {
|
|
file, err := os.Open(cfg.AddressListPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
defer file.Close()
|
|
|
|
scanner := bufio.NewScanner(file)
|
|
addressList := []string{}
|
|
for scanner.Scan() {
|
|
addressList = append(addressList, scanner.Text())
|
|
}
|
|
|
|
return addressList, nil
|
|
}
|