multi: update to latest btcd version
With this commit we update btcd to the latest version which allows us to specify the btcd binary we want to use when spinning up a new node.
This commit is contained in:
9 files changed
+42
-19
No files matched your search
+18
-3
@@ -78,6 +78,11 @@ var (
|
||||
// goroutines of test nodes on failure.
|
||||
goroutineDump = flag.Bool("goroutinedump", false,
|
||||
"write goroutine dump from node n to file pprof-n.log")
|
||||
|
||||
// btcdExecutable is the full path to the btcd binary.
|
||||
btcdExecutable = flag.String(
|
||||
"btcdexec", "", "full path to btcd binary",
|
||||
)
|
||||
)
|
||||
|
||||
// nextAvailablePort returns the first port that is available for listening by
|
||||
@@ -123,6 +128,16 @@ func GetLogDir() string {
|
||||
return "."
|
||||
}
|
||||
|
||||
// GetBtcdBinary returns the full path to the binary of the custom built btcd
|
||||
// executable or an empty string if none is set.
|
||||
func GetBtcdBinary() string {
|
||||
if btcdExecutable != nil {
|
||||
return *btcdExecutable
|
||||
}
|
||||
|
||||
return ""
|
||||
}
|
||||
|
||||
// generateListeningPorts returns four ints representing ports to listen on
|
||||
// designated for the current lightning network test. This returns the next
|
||||
// available ports for the p2p, rpc, rest and profiling services.
|
||||
@@ -394,8 +409,8 @@ func newNode(cfg NodeConfig) (*HarnessNode, error) {
|
||||
// miner node's log dir. When tests finished, during clean up, its logs are
|
||||
// copied to a file specified as logFilename.
|
||||
func NewMiner(logDir, logFilename string, netParams *chaincfg.Params,
|
||||
handler *rpcclient.NotificationHandlers) (*rpctest.Harness,
|
||||
func() error, error) {
|
||||
handler *rpcclient.NotificationHandlers,
|
||||
btcdBinary string) (*rpctest.Harness, func() error, error) {
|
||||
|
||||
args := []string{
|
||||
"--rejectnonstd",
|
||||
@@ -407,7 +422,7 @@ func NewMiner(logDir, logFilename string, netParams *chaincfg.Params,
|
||||
"--trickleinterval=100ms",
|
||||
}
|
||||
|
||||
miner, err := rpctest.New(netParams, handler, args)
|
||||
miner, err := rpctest.New(netParams, handler, args, btcdBinary)
|
||||
if err != nil {
|
||||
return nil, nil, fmt.Errorf(
|
||||
"unable to create mining node: %v", err,
|
||||
|
||||
Reference in new issue
Block a user