eth/downloader: use log.SetDefault instead of log.Root

Signed-off-by: tmelhao <tmelhao@gmail.com>
This commit is contained in:
tmelhao 2024-03-07 03:24:38 +00:00
parent 7c6424df2b
commit 6ed4445968
2 changed files with 2 additions and 2 deletions

View file

@ -1270,7 +1270,7 @@ func TestBeaconSync68Full(t *testing.T) { testBeaconSync(t, eth.ETH68, FullSync)
func TestBeaconSync68Snap(t *testing.T) { testBeaconSync(t, eth.ETH68, SnapSync) } func TestBeaconSync68Snap(t *testing.T) { testBeaconSync(t, eth.ETH68, SnapSync) }
func testBeaconSync(t *testing.T, protocol uint, mode SyncMode) { func testBeaconSync(t *testing.T, protocol uint, mode SyncMode) {
//log.Root().SetHandler(log.LvlFilterHandler(log.LvlInfo, log.StreamHandler(os.Stderr, log.TerminalFormat(true)))) // log.SetDefault(log.NewLogger(log.NewTerminalHandlerWithLevel(os.Stderr, log.LevelInfo, true)))
var cases = []struct { var cases = []struct {
name string // The name of testing scenario name string // The name of testing scenario

View file

@ -514,7 +514,7 @@ func TestSkeletonSyncExtend(t *testing.T) {
// Tests that the skeleton sync correctly retrieves headers from one or more // Tests that the skeleton sync correctly retrieves headers from one or more
// peers without duplicates or other strange side effects. // peers without duplicates or other strange side effects.
func TestSkeletonSyncRetrievals(t *testing.T) { func TestSkeletonSyncRetrievals(t *testing.T) {
//log.Root().SetHandler(log.LvlFilterHandler(log.LvlTrace, log.StreamHandler(os.Stderr, log.TerminalFormat(true)))) // log.SetDefault(log.NewLogger(log.NewTerminalHandlerWithLevel(os.Stderr, log.LevelTrace, true)))
// Since skeleton headers don't need to be meaningful, beyond a parent hash // Since skeleton headers don't need to be meaningful, beyond a parent hash
// progression, create a long fake chain to test with. // progression, create a long fake chain to test with.