@@ -2,6 +2,7 @@ use super::{buffer_sizes, convert::Decode, GlobalStateR};
22use crate :: {
33 blockcfg:: Fragment ,
44 intercom:: { self , BlockMsg , TopologyMsg , TransactionMsg } ,
5+ network:: retrieve_local_ip,
56 settings:: start:: network:: Configuration ,
67 topology:: { Gossip , NodeId } ,
78 utils:: async_msg:: { self , MessageBox } ,
@@ -19,6 +20,7 @@ use std::{
1920 pin:: Pin ,
2021 task:: { Context , Poll } ,
2122} ;
23+
2224use tracing_futures:: Instrument ;
2325
2426fn filter_gossip_node ( node : & Gossip , config : & Configuration ) -> bool {
@@ -372,10 +374,21 @@ impl FragmentProcessor {
372374 & mut self . buffered_fragments ,
373375 Vec :: with_capacity ( buffer_sizes:: inbound:: FRAGMENTS ) ,
374376 ) ;
377+
378+ let addr = match self . global_state . config . address ( ) {
379+ Some ( addr) => FragmentOrigin :: Network { addr : addr. ip ( ) } ,
380+ None => {
381+ tracing:: info!( "node addr not present in config, reverting to local lookup" ) ;
382+ FragmentOrigin :: Network {
383+ addr : retrieve_local_ip ( ) ,
384+ }
385+ }
386+ } ;
387+
375388 let ( reply_handle, _reply_future) = intercom:: unary_reply ( ) ;
376389 self . mbox
377390 . start_send ( TransactionMsg :: SendTransactions {
378- origin : FragmentOrigin :: Network ,
391+ origin : addr ,
379392 fragments,
380393 fail_fast : false ,
381394 reply_handle,
0 commit comments