File tree Expand file tree Collapse file tree
zebrad/src/components/sync Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -127,13 +127,16 @@ where
127127 } ;
128128
129129 info ! ( ?height, ?request, log_msg) ;
130- // broadcast requests don't return errors, and we'd just want to ignore them anyway
131- let _ = broadcast_network
130+ let broadcast_fut = broadcast_network
132131 . ready ( )
133132 . await
134133 . map_err ( PeerSetReadiness ) ?
135- . call ( request)
136- . await ;
134+ . call ( request) ;
135+
136+ // Await the broadcast future in a spawned task to avoid waiting on
137+ // `AdvertiseBlockToAll` requests when there are unready peers.
138+ // Broadcast requests don't return errors, and we'd just want to ignore them anyway.
139+ tokio:: spawn ( broadcast_fut) ;
137140
138141 // Mark the last change hash of `chain_state` as the last block submission hash to avoid
139142 // advertising a block hash to some peers twice.
You can’t perform that action at this time.
0 commit comments