@@ -96,9 +96,6 @@ void protocol_block_in::start()
9696 SEND2 (send_headers (), handle_send, _1, send_headers::command);
9797 }
9898
99- // Subscribe to block acceptance notifications (for gap fill).
100- chain_.subscribe_reorganize (BIND4 (handle_reorganized, _1, _2, _3, _4));
101-
10299 // Send initial get_[blocks|headers] message by simulating first heartbeat.
103100 set_event (error::success);
104101}
@@ -330,6 +327,7 @@ void protocol_block_in::handle_store_block(const code& ec,
330327 return ;
331328 }
332329
330+ // TODO: send reject as applicable.
333331 if (ec)
334332 {
335333 LOG_DEBUG (LOG_NODE)
@@ -356,35 +354,6 @@ void protocol_block_in::handle_store_block(const code& ec,
356354// Subscription.
357355// -----------------------------------------------------------------------------
358356
359- // At least one block was accepted into the chain, originating from any peer.
360- bool protocol_block_in::handle_reorganized (code ec, size_t fork_height,
361- block_const_ptr_list_const_ptr incoming, block_const_ptr_list_const_ptr)
362- {
363- if (stopped (ec))
364- return false ;
365-
366- // TODO: differentiate failure conditions and send reject as applicable.
367-
368- if (ec)
369- {
370- LOG_ERROR (LOG_NODE)
371- << " Failure handling reorganization for [" << authority () << " ] "
372- << ec.message ();
373- stop (ec);
374- return false ;
375- }
376-
377- // //// Report the blocks that originated from this peer.
378- // //// If originating peer is dropped there will be no report here.
379- // //for (const auto block: *incoming)
380- // // if (block->validation.originator == nonce())
381- // // LOG_DEBUG(LOG_NODE)
382- // // << "Reorganized block [" << encode_hash(block->header().hash())
383- // // << "] from [" << authority() << "].";
384-
385- return true ;
386- }
387-
388357void protocol_block_in::handle_stop (const code&)
389358{
390359 LOG_DEBUG (LOG_NETWORK)
0 commit comments