Remove some xtra logs
This commit is contained in:
parent
97786d03d5
commit
ec6ec62dd4
@ -29,14 +29,14 @@ func (pow *EasyPow) Search(block *Block, reactChan chan ethutil.React) []byte {
|
||||
for {
|
||||
select {
|
||||
case <-reactChan:
|
||||
log.Println("[pow] Received reactor event; breaking out.")
|
||||
log.Println("[POW] Received reactor event; breaking out.")
|
||||
return nil
|
||||
default:
|
||||
i++
|
||||
if i%1234567 == 0 {
|
||||
elapsed := time.Now().UnixNano() - start
|
||||
hashes := ((float64(1e9) / float64(elapsed)) * float64(i)) / 1000
|
||||
log.Println("Hashing @", int64(hashes), "khash")
|
||||
log.Println("[POW] Hashing @", int64(hashes), "khash")
|
||||
}
|
||||
|
||||
sha := ethutil.Sha3Bin(big.NewInt(r.Int63()).Bytes())
|
||||
|
@ -214,9 +214,6 @@ func (sm *StateManager) CalculateTD(block *Block) bool {
|
||||
|
||||
// The new TD will only be accepted if the new difficulty is
|
||||
// is greater than the previous.
|
||||
fmt.Println("new block td:", td)
|
||||
fmt.Println("cur block td:", sm.bc.TD)
|
||||
|
||||
if td.Cmp(sm.bc.TD) > 0 {
|
||||
// Set the new total difficulty back to the block chain
|
||||
sm.bc.SetTotalDifficulty(td)
|
||||
|
2
peer.go
2
peer.go
@ -316,7 +316,7 @@ func (p *Peer) HandleInbound() {
|
||||
// 4. No: Let's request more blocks back.
|
||||
|
||||
// Make sure we are actually receiving anything
|
||||
if msg.Data.Len()-1 > 1 {
|
||||
if msg.Data.Len()-1 > 1 && p.catchingUp {
|
||||
// We requested blocks and now we need to make sure we have a common ancestor somewhere in these blocks so we can find
|
||||
// common ground to start syncing from
|
||||
lastBlock = ethchain.NewBlockFromRlpValue(msg.Data.Get(msg.Data.Len() - 1))
|
||||
|
Loading…
Reference in New Issue
Block a user