Skip to content

Commit 5ed1c33

Browse files
committed
spacing
1 parent b78ef5b commit 5ed1c33

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

src/choreo/tower/fd_epoch_stakes.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,16 @@ fd_epoch_stakes_new( void * shmem, ulong slot_max ) {
2222

2323
FD_SCRATCH_ALLOC_INIT( l, shmem );
2424
fd_epoch_stakes_t * epoch_stakes = FD_SCRATCH_ALLOC_APPEND( l, alignof(fd_epoch_stakes_t), sizeof(fd_epoch_stakes_t) );
25-
void * voter_stake_map = FD_SCRATCH_ALLOC_APPEND( l, fd_voter_stake_map_align(), fd_voter_stake_map_footprint( FD_VOTER_MAX * slot_max ) );
25+
void * voter_stake_map = FD_SCRATCH_ALLOC_APPEND( l, fd_voter_stake_map_align(), fd_voter_stake_map_footprint ( FD_VOTER_MAX * slot_max ) );
2626
void * voter_stake_pool = FD_SCRATCH_ALLOC_APPEND( l, fd_voter_stake_pool_align(), fd_voter_stake_pool_footprint( FD_VOTER_MAX * slot_max ) );
2727
void * epoch_stakes_slot_map = FD_SCRATCH_ALLOC_APPEND( l, fd_epoch_stakes_slot_map_align(), fd_epoch_stakes_slot_map_footprint( lg_slot_cnt ) );
2828
void * used_acc_scratch = FD_SCRATCH_ALLOC_APPEND( l, fd_used_acc_scratch_align(), fd_used_acc_scratch_footprint( FD_VOTER_MAX * slot_max ) );
29-
FD_LOG_NOTICE(( " layout l: %lu, shmem: %lu, footprint: %lu", _l, (ulong)shmem, footprint ));
30-
//FD_TEST( FD_SCRATCH_ALLOC_FINI( l, fd_epoch_stakes_align() ) == (ulong)shmem + footprint );
31-
epoch_stakes->voter_stake_map = fd_voter_stake_map_join( fd_voter_stake_map_new( voter_stake_map, FD_VOTER_MAX * slot_max, 0 ) );
32-
epoch_stakes->voter_stake_pool = fd_voter_stake_pool_join( fd_voter_stake_pool_new( voter_stake_pool, FD_VOTER_MAX * slot_max ) );
29+
FD_TEST( FD_SCRATCH_ALLOC_FINI( l, fd_epoch_stakes_align() ) == (ulong)shmem + footprint );
30+
31+
epoch_stakes->voter_stake_map = fd_voter_stake_map_join ( fd_voter_stake_map_new ( voter_stake_map, FD_VOTER_MAX * slot_max, 0 ) );
32+
epoch_stakes->voter_stake_pool = fd_voter_stake_pool_join ( fd_voter_stake_pool_new ( voter_stake_pool, FD_VOTER_MAX * slot_max ) );
3333
epoch_stakes->slot_stakes_map = fd_epoch_stakes_slot_map_join( fd_epoch_stakes_slot_map_new( epoch_stakes_slot_map, lg_slot_cnt ) );
34-
epoch_stakes->used_acc_scratch = fd_used_acc_scratch_join( fd_used_acc_scratch_new( used_acc_scratch, FD_VOTER_MAX * slot_max ) );
34+
epoch_stakes->used_acc_scratch = fd_used_acc_scratch_join ( fd_used_acc_scratch_new ( used_acc_scratch, FD_VOTER_MAX * slot_max ) );
3535
return shmem;
3636
}
3737

src/choreo/tower/fd_epoch_stakes.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ typedef struct fd_voter_stake fd_voter_stake_t;
5252

5353
#define MAP_NAME fd_voter_stake_map
5454
#define MAP_ELE_T fd_voter_stake_t
55-
#define MAP_KEY key
5655
#define MAP_KEY_T fd_voter_stake_key_t
5756
#define MAP_KEY_EQ(k0,k1) (!memcmp( k0, k1, sizeof(fd_voter_stake_key_t) ))
5857
#define MAP_KEY_HASH(key, seed) fd_ulong_hash( ((key)->slot) ^ ((key)->vote_account.ul[0]) ^ (seed) )
@@ -84,7 +83,7 @@ typedef struct fd_epoch_stakes_slot fd_epoch_stakes_slot_t;
8483
#define MAP_MEMOIZE 0
8584
#include "../../util/tmpl/fd_map_dynamic.c"
8685

87-
struct __attribute__((aligned(32))) fd_epoch_stakes {
86+
struct fd_epoch_stakes {
8887
fd_voter_stake_map_t * voter_stake_map;
8988
fd_voter_stake_t * voter_stake_pool;
9089
fd_epoch_stakes_slot_t * slot_stakes_map;

0 commit comments

Comments
 (0)