LCOV - code coverage report
Current view: top level - disco - fd_txn_p.h (source / functions) Hit Total Coverage
Test: cov.lcov Lines: 1 1 100.0 %
Date: 2025-10-13 04:42:14 Functions: 0 0 -

          Line data    Source code
       1             : #ifndef HEADER_fd_src_disco_fd_txn_p_h
       2             : #define HEADER_fd_src_disco_fd_txn_p_h
       3             : 
       4             : #include "../ballet/txn/fd_txn.h"
       5             : 
       6             : struct __attribute__((aligned(64))) fd_txn_p {
       7             :   uchar payload[FD_TPU_MTU];
       8             :   ulong payload_sz;
       9             :   union {
      10             :    struct {
      11             :      uint non_execution_cus;
      12             :      uint requested_exec_plus_acct_data_cus;
      13             :    } pack_cu; /* Populated by pack. Bank reads these to populate the other struct of the union. */
      14             :    struct {
      15             :      uint rebated_cus; /* requested_exec_plus_acct_data_cus-actual used CUs. Pack reads this for CU rebating. */
      16             :      uint actual_consumed_cus; /* non_execution_cus+real execution CUs+real account data cus. PoH reads this for block CU counting. */
      17             :    } bank_cu; /* Populated by bank. */
      18             :    ulong blockhash_slot; /* Slot provided by resolv tile when txn arrives at the pack tile. Used when txn is in extra storage in pack. */
      19             :   };
      20             :   /* The time that the transaction arrived to the pack tile in ticks. Set by pack and intended to be read from a transaction on a pack->bank link. */
      21             :   long scheduler_arrival_time_nanos;
      22             : 
      23             :   /* Source ipv4 address and tpu pipeline for this transaction. TPU is one of FD_TXN_M_TPU_SOURCE_* */
      24             :   uchar source_tpu;
      25             :   uint  source_ipv4;
      26             : 
      27             :   /* Populated by pack, bank.  A combination of the bitfields
      28             :      FD_TXN_P_FLAGS_* defined above.  The bank sets the high byte with
      29             :      the transaction result code. */
      30             :   uint  flags;
      31             :   /* union {
      32             :     This would be ideal but doesn't work because of the flexible array member
      33             :     uchar _[FD_TXN_MAX_SZ];
      34             :     fd_txn_t txn;
      35             :   }; */
      36             :   /* Access with TXN macro below */
      37             :   uchar _[FD_TXN_MAX_SZ] __attribute__((aligned(alignof(fd_txn_t))));
      38             : };
      39             : 
      40             : typedef struct fd_txn_p fd_txn_p_t;
      41             : 
      42    94826575 : #define TXN(txn_p) ((fd_txn_t *)( (txn_p)->_ ))
      43             : 
      44             : /* fd_txn_e_t: An fd_txn_p_t with expanded address lookup tables */
      45             : struct __attribute__((aligned(64))) fd_txn_e {
      46             :    fd_txn_p_t     txnp[1];
      47             :    fd_acct_addr_t alt_accts[FD_TXN_ACCT_ADDR_MAX]; /* The used account is in the fd_txn_t*/
      48             : };
      49             : 
      50             : typedef struct fd_txn_e fd_txn_e_t;
      51             : 
      52             : #endif /* HEADER_fd_src_disco_fd_txn_p_h */

Generated by: LCOV version 1.14