aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ethchain/dagger.go4
-rw-r--r--ethchain/state_manager.go3
-rw-r--r--peer.go2
3 files changed, 3 insertions, 6 deletions
diff --git a/ethchain/dagger.go b/ethchain/dagger.go
index a80a9d421..9d2df4069 100644
--- a/ethchain/dagger.go
+++ b/ethchain/dagger.go
@@ -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())
diff --git a/ethchain/state_manager.go b/ethchain/state_manager.go
index 5692a1d88..d907141a4 100644
--- a/ethchain/state_manager.go
+++ b/ethchain/state_manager.go
@@ -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)
diff --git a/peer.go b/peer.go
index b8e75c686..63059bcfb 100644
--- a/peer.go
+++ b/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))