talelbaz 28a8e96e65
New stability test - many tips (#1694)
* Unfinished code.

* Update the testnet version to testnet-5. (#1683)

* Generalize stability-tests/docker/Dockerfile. (#1685)

* Committed for rebasing.

* Adds stability-test many-tips, which tests kaspad handling with many tips in the DAG.

* Delete manytips_test.go.

* Add timeout to the test and create only one RPC client.

* Place the spawn before the for loop and remove a redundant condition.

Co-authored-by: tal <tal@daglabs.com>
Co-authored-by: stasatdaglabs <39559713+stasatdaglabs@users.noreply.github.com>
2021-05-10 15:03:20 +03:00

30 lines
689 B
Go

package main
import (
"fmt"
"github.com/kaspanet/kaspad/infrastructure/logger"
"github.com/kaspanet/kaspad/stability-tests/common"
"github.com/kaspanet/kaspad/util/panics"
"os"
)
var (
backendLog = logger.NewBackend()
log = backendLog.Logger("MATS")
spawn = panics.GoroutineWrapperFunc(log)
)
func initLog(logFile, errLogFile string) {
level := logger.LevelDebug
if activeConfig().LogLevel != "" {
var ok bool
level, ok = logger.LevelFromString(activeConfig().LogLevel)
if !ok {
fmt.Fprintf(os.Stderr, "Log level %s doesn't exists", activeConfig().LogLevel)
os.Exit(1)
}
}
log.SetLevel(level)
common.InitBackend(backendLog, logFile, errLogFile)
}