Line data Source code
1 : #ifndef HEADER_fd_src_flamenco_snapshot_fd_snapshot_base_h 2 : #define HEADER_fd_src_flamenco_snapshot_fd_snapshot_base_h 3 : 4 : #include "../fd_flamenco_base.h" 5 : 6 : /* FD_SNAPSHOT_CREATE_{ALIGN,FOOTPRINT} are const-friendly versions 7 : of the memory region parameters for the fd_snapshot_create_t object. */ 8 : 9 : #define FD_SNAPSHOT_CREATE_ALIGN (32UL) 10 : 11 : /* FD_SNAPSHOT_ACC_ALIGN is the alignment of an account header in an 12 : account vec / "AppendVec". */ 13 : 14 24 : #define FD_SNAPSHOT_ACC_ALIGN (8UL) 15 : 16 0 : #define FD_SNAPSHOT_TYPE_UNSPECIFIED 0 17 0 : #define FD_SNAPSHOT_TYPE_FULL 1 18 0 : #define FD_SNAPSHOT_TYPE_INCREMENTAL 2 19 : 20 : struct fd_snapshot_name { 21 : int type; 22 : ulong slot; 23 : ulong incremental_slot; 24 : fd_hash_t fhash; 25 : char file_ext[ 16 ]; 26 : }; 27 : 28 : typedef struct fd_snapshot_name fd_snapshot_name_t; 29 : 30 : FD_PROTOTYPES_BEGIN 31 : 32 : 33 : fd_snapshot_name_t * 34 : fd_snapshot_name_from_cstr( fd_snapshot_name_t * id, 35 : char const * cstr, 36 : ulong base_slot ); 37 : 38 : fd_snapshot_name_t * 39 : fd_snapshot_name_from_buf( fd_snapshot_name_t * id, 40 : char const * str, 41 : ulong str_len, 42 : ulong base_slot ); 43 : 44 : FD_PROTOTYPES_END 45 : 46 : #endif /* HEADER_fd_src_flamenco_snapshot_fd_snapshot_base_h */