mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 02:42:27 +00:00
verbose logging + log statements
This commit is contained in:
parent
c7942ce10d
commit
16ef4825b5
2 changed files with 3 additions and 0 deletions
|
|
@ -498,6 +498,7 @@ func (d *Downloader) syncWithPeer(p *peerConnection, hash common.Hash, td, ttd *
|
|||
if number < oldest.Number.Uint64() {
|
||||
count := int(oldest.Number.Uint64() - number) // it's capped by fsMinFullBlocks
|
||||
headers := d.readHeaderRange(oldest, count)
|
||||
fmt.Printf("readHeaderRange, oldest=%x, oldest num=%d, count=%d\n", oldest.Hash(), oldest.Number, count)
|
||||
if len(headers) == count {
|
||||
pivot = headers[len(headers)-1]
|
||||
log.Warn("Retrieved pivot header from local", "number", pivot.Number, "hash", pivot.Hash(), "latest", latest.Number, "oldest", oldest.Number)
|
||||
|
|
|
|||
|
|
@ -1355,6 +1355,7 @@ func testBeaconForkedSyncProgress(t *testing.T, protocol uint, mode SyncMode) {
|
|||
}
|
||||
}()
|
||||
|
||||
log.SetDefault(log.NewLogger(log.NewTerminalHandlerWithLevel(os.Stdout, log.LevelInfo, false)))
|
||||
<-starting
|
||||
progress <- struct{}{}
|
||||
select {
|
||||
|
|
@ -1367,6 +1368,7 @@ func testBeaconForkedSyncProgress(t *testing.T, protocol uint, mode SyncMode) {
|
|||
t.Fatalf("Failed to sync chain in three seconds")
|
||||
}
|
||||
|
||||
fmt.Println("syncing to fork B")
|
||||
// Set the head to a second fork
|
||||
tester.newPeer("fork B", protocol, chainB.blocks[1:])
|
||||
pending.Add(1)
|
||||
|
|
|
|||
Loading…
Reference in a new issue