@@ -3721,15 +3721,21 @@ namespace eosio {
3721
3721
switch (msg.req_blocks .mode ) {
3722
3722
case catch_up : {
3723
3723
const block_id_type& id = msg.req_blocks .ids .empty () ? block_id_type () : msg.req_blocks .ids .back ();
3724
- peer_dlog ( this , " received request_message:catch_up #${bn}:${id}" , (" bn" , block_header::num_from_id (id))(" id" ,id) );
3724
+ peer_dlog ( this , " ${d} request_message:catch_up #${bn}:${id}" ,
3725
+ (" d" , is_blocks_connection () ? " received" : " ignoring" )(" bn" , block_header::num_from_id (id))(" id" ,id) );
3726
+ if (!is_blocks_connection ())
3727
+ return ;
3725
3728
blk_send_branch ( id );
3726
- break ;
3729
+ return ;
3727
3730
}
3728
3731
case normal : {
3729
3732
if (protocol_version >= proto_block_nack) {
3730
3733
if (!msg.req_blocks .ids .empty ()) {
3731
3734
const block_id_type& id = msg.req_blocks .ids .back ();
3732
- peer_dlog ( this , " received request_message:normal #${bn}:${id}" , (" bn" , block_header::num_from_id (id))(" id" ,id) );
3735
+ peer_dlog ( this , " ${d} request_message:normal #${bn}:${id}" ,
3736
+ (" d" , is_blocks_connection () ? " received" : " ignoring" )(" bn" , block_header::num_from_id (id))(" id" ,id) );
3737
+ if (!is_blocks_connection ())
3738
+ return ;
3733
3739
uint32_t head_num = my_impl->get_chain_head_num ();
3734
3740
auto msg_head_num = block_header::num_from_id (id);
3735
3741
// --msg_head_num since blk_send_branch adds one to request and we need to start at msg_head_num
@@ -3771,6 +3777,11 @@ namespace eosio {
3771
3777
peer_requested.reset ();
3772
3778
flush_queues ();
3773
3779
} else {
3780
+ if (!is_blocks_connection ()) {
3781
+ peer_dlog (this , " received sync_request_message ${m} on transaction only connection, ignoring" , (" m" , msg));
3782
+ return ;
3783
+ }
3784
+
3774
3785
if (peer_requested) {
3775
3786
// This happens when peer already requested some range and sync is still in progress
3776
3787
// It could be higher in case of peer requested head catchup and current request is lib catchup
0 commit comments