diff options
author | Jeffrey Wilcke <jeffrey@ethereum.org> | 2016-11-13 19:34:50 +0800 |
---|---|---|
committer | Felix Lange <fjl@twurst.com> | 2016-11-13 19:34:50 +0800 |
commit | 21701190ac0a838e347f31b7a918bb0a60c1e8c1 (patch) | |
tree | ec64fa5cac65f72ef4c0777c25620621c935ec4f /les/server.go | |
parent | 932d973e36ff0d41a6005b93d2d4ff1b4430fb04 (diff) | |
download | dexon-21701190ac0a838e347f31b7a918bb0a60c1e8c1.tar dexon-21701190ac0a838e347f31b7a918bb0a60c1e8c1.tar.gz dexon-21701190ac0a838e347f31b7a918bb0a60c1e8c1.tar.bz2 dexon-21701190ac0a838e347f31b7a918bb0a60c1e8c1.tar.lz dexon-21701190ac0a838e347f31b7a918bb0a60c1e8c1.tar.xz dexon-21701190ac0a838e347f31b7a918bb0a60c1e8c1.tar.zst dexon-21701190ac0a838e347f31b7a918bb0a60c1e8c1.zip |
les: cleaned up logging (#3256)
Diffstat (limited to 'les/server.go')
-rw-r--r-- | les/server.go | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/les/server.go b/les/server.go index daa28be05..60af6a9e1 100644 --- a/les/server.go +++ b/les/server.go @@ -19,7 +19,6 @@ package les import ( "encoding/binary" - "fmt" "math" "sync" "time" @@ -31,6 +30,8 @@ import ( "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/les/flowcontrol" "github.com/ethereum/go-ethereum/light" + "github.com/ethereum/go-ethereum/logger" + "github.com/ethereum/go-ethereum/logger/glog" "github.com/ethereum/go-ethereum/p2p" "github.com/ethereum/go-ethereum/rlp" "github.com/ethereum/go-ethereum/trie" @@ -288,7 +289,9 @@ func (pm *ProtocolManager) blockLoop() { } lastHead = header lastBroadcastTd = td - //fmt.Println("BROADCAST", number, hash, td, reorg) + + glog.V(logger.Debug).Infoln("===> ", number, hash, td, reorg) + announce := announceData{Hash: hash, Number: number, Td: td, ReorgDepth: reorg} for _, p := range peers { select { @@ -391,7 +394,9 @@ func makeCht(db ethdb.Database) bool { lastChtNum = 0 } else { lastChtNum++ - fmt.Printf("CHT %d %064x\n", lastChtNum, root) + + glog.V(logger.Info).Infoln("CHT %d %064x\n", lastChtNum, root) + storeChtRoot(db, lastChtNum, root) var data [8]byte binary.BigEndian.PutUint64(data[:], lastChtNum) |