LCOV - code coverage report
Current view: top level - discof/gossip - fd_gossip_tile.h (source / functions) Hit Total Coverage
Test: cov.lcov Lines: 0 12 0.0 %
Date: 2025-10-13 04:42:14 Functions: 0 28 0.0 %

          Line data    Source code
       1             : #ifndef HEADER_fd_src_discof_gossip_fd_gossip_tile_h
       2             : #define HEADER_fd_src_discof_gossip_fd_gossip_tile_h
       3             : 
       4             : #include "../../disco/topo/fd_topo.h"
       5             : #include "../../flamenco/gossip/fd_gossip.h"
       6             : #include "../../disco/keyguard/fd_keyguard_client.h"
       7             : #include "../../disco/keyguard/fd_keyswitch.h"
       8             : 
       9             : typedef struct {
      10             :   int         kind;
      11             :   fd_wksp_t * mem;
      12             :   ulong       chunk0;
      13             :   ulong       wmark;
      14             :   ulong       mtu;
      15             : } fd_gossip_in_ctx_t;
      16             : 
      17             : struct fd_gossip_tile_ctx {
      18             :   fd_gossip_t * gossip;
      19             : 
      20             :   fd_contact_info_t my_contact_info[1];
      21             : 
      22             :   fd_stem_context_t * stem;
      23             : 
      24             :   uint  rng_seed;
      25             :   ulong rng_idx;
      26             : 
      27             :   double ticks_per_ns;
      28             :   long   last_wallclock;
      29             :   long   last_tickcount;
      30             : 
      31             :   fd_stake_weight_t * stake_weights_converted;
      32             : 
      33             :   fd_gossip_in_ctx_t in[ 128UL ];
      34             : 
      35             :   fd_gossip_out_ctx_t net_out[ 1 ];
      36             :   fd_gossip_out_ctx_t gossip_out[ 1 ];
      37             :   fd_gossip_out_ctx_t gossvf_out[ 1 ];
      38             :   fd_gossip_out_ctx_t sign_out[ 1 ];
      39             : 
      40             :   fd_keyguard_client_t keyguard_client[ 1 ];
      41             :   fd_keyswitch_t * keyswitch;
      42             : 
      43             :   ushort            net_id;
      44             :   fd_ip4_udp_hdrs_t net_out_hdr[ 1 ];
      45             :   fd_rng_t          rng[ 1 ];
      46             : };
      47             : 
      48             : typedef struct fd_gossip_tile_ctx fd_gossip_tile_ctx_t;
      49             : 
      50             : static inline ulong
      51             : fd_gossvf_sig( uint   addr,
      52             :                ushort port,
      53           0 :                ushort kind ) {
      54           0 :   return (ulong)addr | ((ulong)port<<32) | ((ulong)kind<<48);
      55           0 : }
      56             : 
      57             : static inline uint
      58           0 : fd_gossvf_sig_addr( ulong sig ) {
      59           0 :   return (uint)(sig & 0xFFFFFFFFUL);
      60           0 : }
      61             : 
      62             : static inline ushort
      63           0 : fd_gossvf_sig_port( ulong sig ) {
      64           0 :   return (ushort)(sig>>32);
      65           0 : }
      66             : 
      67             : static inline ushort
      68           0 : fd_gossvf_sig_kind( ulong sig ) {
      69           0 :   return (ushort)(sig>>48);
      70           0 : }
      71             : 
      72             : struct fd_gossip_pingreq {
      73             :   fd_pubkey_t pubkey;
      74             : };
      75             : 
      76             : typedef struct fd_gossip_pingreq fd_gossip_pingreq_t;
      77             : 
      78             : struct fd_gossip_ping_update {
      79             :   fd_pubkey_t   pubkey;
      80             :   fd_ip4_port_t gossip_addr;
      81             :   int           remove;
      82             : };
      83             : 
      84             : typedef struct fd_gossip_ping_update fd_gossip_ping_update_t;
      85             : 
      86             : extern fd_topo_run_tile_t fd_tile_gossip;
      87             : 
      88             : #endif /* HEADER_fd_src_discof_gossip_fd_gossip_tile_h */

Generated by: LCOV version 1.14