LCOV - code coverage report
Current view: top level - flamenco/alpenglow - fd_block_marker.c (source / functions) Hit Total Coverage
Test: cov.lcov Lines: 12 12 100.0 %
Date: 2026-09-17 04:28:31 Functions: 1 1 100.0 %

          Line data    Source code
       1             : #include "fd_block_marker.h"
       2             : 
       3             : int
       4             : fd_block_footer_cert_from_agg( fd_block_footer_cert_t * cert,
       5             :                                ulong                    slot,
       6             :                                uchar const *            block_hash,
       7           9 :                                fd_bls_agg_t const *     agg ) {
       8           9 :   if( FD_UNLIKELY( fd_bls_set_is_null( agg->set ) ) ) return 0; /* nobody signed */
       9             : 
      10           6 :   fd_memset( cert, 0, sizeof(fd_block_footer_cert_t) );
      11           6 :   cert->slot  = slot;
      12           6 :   cert->nbits = (ushort)( fd_bls_set_last( agg->set )+1UL );
      13           6 :   if( block_hash ) memcpy( cert->block_id.uc, block_hash, sizeof(fd_hash_t) );
      14           6 :   fd_bls_set_copy( cert->signer_set, agg->set );
      15           6 :   blst_p2_affine a[1];
      16           6 :   blst_p2_to_affine( a, &agg->sig );
      17           6 :   blst_p2_affine_compress( cert->sig, a );
      18           6 :   return 1;
      19           9 : }

Generated by: LCOV version 1.14