Skip to content

Commit 76b790d

Browse files
two-heartjherrera-jump
authored andcommitted
gui: update country code with new (instead of old) contact info
1 parent 2703795 commit 76b790d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/disco/gui/fd_gui_peers.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -513,19 +513,19 @@ fd_gui_peers_handle_gossip_update( fd_gui_peers_ctx_t * peers,
513513
break;
514514
}
515515

516+
fd_gui_peers_node_sock_map_idx_remove_fast( peers->node_sock_map, update->contact_info.idx, peers->contact_info_table );
517+
fd_gui_peers_live_table_idx_remove ( peers->live_table, update->contact_info.idx, peers->contact_info_table );
518+
519+
fd_memcpy( &peer->contact_info, update->contact_info.contact_info, sizeof(peer->contact_info) );
520+
521+
peer->update_time_nanos = now;
516522
/* fetch and set country code */
517523
#if FD_HAS_ZSTD
518524
peer->country_code_idx = ipinfo_lookup( ipinfo_nodes, peer->contact_info.sockets[ FD_CONTACT_INFO_SOCKET_GOSSIP ].addr );
519525
#else
520526
peer->country_code_idx = UCHAR_MAX;
521527
#endif
522528

523-
fd_gui_peers_node_sock_map_idx_remove_fast( peers->node_sock_map, update->contact_info.idx, peers->contact_info_table );
524-
fd_gui_peers_live_table_idx_remove ( peers->live_table, update->contact_info.idx, peers->contact_info_table );
525-
526-
fd_memcpy( &peer->contact_info, update->contact_info.contact_info, sizeof(peer->contact_info) );
527-
peer->update_time_nanos = now;
528-
529529
fd_gui_peers_live_table_idx_insert ( peers->live_table, update->contact_info.idx, peers->contact_info_table );
530530
fd_gui_peers_node_sock_map_idx_insert ( peers->node_sock_map, update->contact_info.idx, peers->contact_info_table );
531531

0 commit comments

Comments
 (0)