Commit bd65c3e22c1dc4b3748ffbd7538ab3fc0a8ea665

Authored by Marius Hanne
Committed by Julian Langschaedel
1 parent b4dac1ed09

only relay blocks once the storage is in sync

Showing 1 changed file with 1 additions and 0 deletions Side-by-side Diff

lib/bitcoin/network/node.rb
... ... @@ -255,6 +255,7 @@
255 255  
256 256 subscribe(:block) do |blk, depth|
257 257 @log.debug { "Relaying block #{blk.hash}" }
  258 + next unless @store.in_sync?
258 259 @connections.each do |conn|
259 260 next unless conn.connected?
260 261 conn.send_inv(:block, blk.hash)