@@ -222,6 +222,8 @@ func (n *Node) loadStatus() *ctypes.ResultStatus {
222222}
223223
224224func (n * Node ) syncStatus (ctx context.Context ) (* ctypes.ResultStatus , error ) {
225+ log := log .With ().Str ("node" , n .Redacted ()).Logger ()
226+
225227 retryOpts := []retry.Option {
226228 retry .Context (ctx ),
227229 retry .Delay (1 * time .Second ),
@@ -243,7 +245,7 @@ func (n *Node) syncStatus(ctx context.Context) (*ctypes.ResultStatus, error) {
243245
244246 if status .SyncInfo .CatchingUp {
245247 // We're catching up, not synced
246- log .Warn ().Msgf ( "node %s is catching up at block %d " , n . Redacted (), status .SyncInfo .LatestBlockHeight )
248+ log .Warn ().Int64 ( " block" , status .SyncInfo .LatestBlockHeight ). Msgf ( "node is catching up" )
247249 return status , nil
248250 }
249251
@@ -259,6 +261,8 @@ func (n *Node) syncStatus(ctx context.Context) (*ctypes.ResultStatus, error) {
259261}
260262
261263func (n * Node ) handleStart (ctx context.Context ) {
264+ log := log .With ().Str ("node" , n .Redacted ()).Logger ()
265+
262266 for _ , onStart := range n .onStart {
263267 if err := onStart (ctx , n ); err != nil {
264268 log .Error ().Err (err ).Msgf ("failed to call start node callback" )
@@ -291,6 +295,8 @@ func (n *Node) saveLatestBlock(block *types.Block) {
291295}
292296
293297func (n * Node ) syncBlocks (ctx context.Context ) {
298+ log := log .With ().Str ("node" , n .Redacted ()).Logger ()
299+
294300 // Fetch latest block
295301 currentBlockResp , err := n .Client .Block (ctx , nil )
296302 if err != nil {
0 commit comments