cli,pkg: use zap.Logger

This commit is contained in:
Evgenii Stratonikov 2019-12-30 10:43:05 +03:00
parent 9c79684516
commit aecdf470e7
23 changed files with 208 additions and 180 deletions

View file

@ -13,6 +13,7 @@ import (
"github.com/CityOfZion/neo-go/pkg/network"
"github.com/CityOfZion/neo-go/pkg/rpc"
"github.com/stretchr/testify/require"
"go.uber.org/zap/zaptest"
)
// Benchmark test to measure number of processed TX.
@ -23,14 +24,15 @@ func BenchmarkTXPerformanceTest(t *testing.B) {
cfg, err := config.Load(configPath, net)
require.NoError(t, err, "could not load config")
logger := zaptest.NewLogger(t)
memoryStore := storage.NewMemoryStore()
chain, err := core.NewBlockchain(memoryStore, cfg.ProtocolConfiguration)
chain, err := core.NewBlockchain(memoryStore, cfg.ProtocolConfiguration, logger)
require.NoError(t, err, "could not create chain")
go chain.Run()
serverConfig := network.NewServerConfig(cfg)
server := network.NewServer(serverConfig, chain)
server := network.NewServer(serverConfig, chain, logger)
data := prepareData(t)
t.ResetTimer()