Skip to content

Commit ea15783

Browse files
riptlripatel-fd
authored andcommitted
Remove commented out code
1 parent 6dbb69e commit ea15783

File tree

8 files changed

+0
-934
lines changed

8 files changed

+0
-934
lines changed

src/app/ledger/main.c

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -125,32 +125,6 @@ ingest_rocksdb( char const * file,
125125
FD_LOG_NOTICE(( "ingested %lu blocks", blk_cnt ));
126126
}
127127

128-
// void
129-
// init_blockstore( fd_ledger_args_t * args ) {
130-
// fd_wksp_tag_query_info_t info;
131-
// ulong blockstore_tag = FD_BLOCKSTORE_MAGIC;
132-
// void * shmem;
133-
// if( fd_wksp_tag_query( args->wksp, &blockstore_tag, 1, &info, 1 ) > 0 ) {
134-
// shmem = fd_wksp_laddr_fast( args->wksp, info.gaddr_lo );
135-
// args->blockstore = fd_blockstore_join( &args->blockstore_ljoin, shmem );
136-
// if( args->blockstore->shmem->magic != FD_BLOCKSTORE_MAGIC ) {
137-
// FD_LOG_ERR(( "failed to join a blockstore" ));
138-
// }
139-
// FD_LOG_NOTICE(( "joined blockstore" ));
140-
// } else {
141-
// shmem = fd_wksp_alloc_laddr( args->wksp, fd_blockstore_align(), fd_blockstore_footprint( args->shred_max, args->slot_history_max, 16 ), blockstore_tag );
142-
// if( shmem == NULL ) {
143-
// FD_LOG_ERR(( "failed to allocate a blockstore" ));
144-
// }
145-
// args->blockstore = fd_blockstore_join( &args->blockstore_ljoin, fd_blockstore_new( shmem, 1, args->hashseed, args->shred_max, args->slot_history_max, 16 ) );
146-
// if( args->blockstore->shmem->magic != FD_BLOCKSTORE_MAGIC ) {
147-
// fd_wksp_free_laddr( shmem );
148-
// FD_LOG_ERR(( "failed to allocate a blockstore" ));
149-
// }
150-
// FD_LOG_NOTICE(( "allocating a new blockstore" ));
151-
// }
152-
// }
153-
154128
void
155129
wksp_restore( fd_ledger_args_t * args ) {
156130
if( args->restore != NULL ) {

src/ballet/reedsol/test_reedsol.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -990,8 +990,6 @@ main( int argc,
990990
char ** argv ) {
991991
fd_boot( &argc, &argv );
992992

993-
// ulong cnt = fd_env_strip_cmdline_ulong( &argc, &argv, "--cnt", NULL, 100000UL );
994-
995993
fd_rng_t _rng[1]; fd_rng_t * rng = fd_rng_join( fd_rng_new( _rng, 0U, 0UL ) );
996994

997995
basic_tests();

src/choreo/forks/fd_forks.c

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -130,49 +130,6 @@ fd_forks_query_const( fd_forks_t const * forks, ulong slot ) {
130130
return fd_fork_frontier_ele_query_const( forks->frontier, &slot, NULL, forks->pool );
131131
}
132132

133-
// fd_fork_t *
134-
// fd_forks_advance( fd_forks_t * forks,
135-
// fd_fork_t * fork,
136-
// ulong slot,
137-
// fd_funk_t * funk,
138-
// fd_blockstore_t * blockstore,
139-
// fd_funk_t * funk,
140-
// fd_valloc_t valloc ) {
141-
// // Remove slot ctx from frontier
142-
// fd_fork_t * child = fd_fork_frontier_ele_remove( forks->frontier,
143-
// &fork->slot,
144-
// NULL,
145-
// forks->pool );
146-
// child->slot = curr_slot;
147-
// if( FD_UNLIKELY( fd_fork_frontier_ele_query( forks->frontier,
148-
// &curr_slot,
149-
// NULL,
150-
// forks->pool ) ) ) {
151-
// FD_LOG_ERR( ( "invariant violation: child slot %lu was already in the
152-
// frontier", curr_slot ) );
153-
// }
154-
// fd_fork_frontier_ele_insert( forks->frontier, child, forks->pool );
155-
// FD_TEST( fork == child );
156-
157-
// // fork is advancing
158-
// FD_LOG_DEBUG(( "new block execution - slot: %lu, parent_slot: %lu", curr_slot, parent_slot ));
159-
160-
// fork->slot_ctx.status_cache = status_cache;
161-
// fd_funk_txn_xid_t xid;
162-
163-
// fd_memcpy( xid.uc, blockhash.uc, sizeof( fd_funk_txn_xid_t));
164-
// xid.ul[0] = fork->slot_ctx.slot_bank.slot;
165-
// /* push a new transaction on the stack */
166-
// fd_funk_start_write( funk );
167-
// fork->slot_ctx.funk_txn = fd_funk_txn_prepare( funk, fork->slot_ctx.funk_txn, &xid, 1 );
168-
// fd_funk_end_write( funk );
169-
170-
// int res = fd_runtime_publish_old_txns( &fork->slot_ctx, capture_ctx );
171-
// if( res != FD_RUNTIME_EXECUTE_SUCCESS ) {
172-
// FD_LOG_ERR(( "txn publishing failed" ));
173-
// }
174-
// }
175-
176133
fd_fork_t *
177134
fd_forks_prepare( fd_forks_t const * forks, ulong parent_slot ) {
178135

src/choreo/voter/test_voter.c

Lines changed: 0 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -76,67 +76,4 @@ main( int argc, char ** argv ) {
7676

7777
test_voter_v1_14_11();
7878
test_voter_current();
79-
80-
// /* keys */
81-
// uchar validator_identity_keypair[64];
82-
// fd_pubkey_t vote_acct_addr;
83-
// FD_TEST( 64UL == getrandom( validator_identity_keypair, 64UL, 0 ) );
84-
// FD_TEST( 32UL == getrandom( vote_acct_addr.key, 32UL, 0 ) );
85-
// FD_PARAM_UNUSED fd_pubkey_t * validator_identity = (fd_pubkey_t *)fd_type_pun_const( validator_identity_keypair +
86-
// 32 );
87-
88-
// /* workspace */
89-
// ulong page_cnt = 1;
90-
// char * _page_sz = "gigantic";
91-
// ulong numa_idx = fd_shmem_numa_idx( 0 );
92-
// fd_wksp_t * wksp = fd_wksp_new_anonymous( fd_cstr_to_shmem_page_sz( _page_sz ),
93-
// page_cnt,
94-
// fd_shmem_cpu_idx( numa_idx ),
95-
// "wksp",
96-
// 0UL );
97-
// FD_TEST( wksp );
98-
99-
// /* alloc */
100-
// void * alloc_shmem = fd_wksp_alloc_laddr( wksp,
101-
// fd_alloc_align(),
102-
// fd_alloc_footprint(),
103-
// TEST_VOTE_TXN_MAGIC );
104-
// void * alloc_shalloc = fd_alloc_new( alloc_shmem, TEST_VOTE_TXN_MAGIC );
105-
// FD_PARAM_UNUSED fd_alloc_t * alloc = fd_alloc_join( alloc_shalloc, 0UL );
106-
// FD_PARAM_UNUSED fd_valloc_t valloc = fd_alloc_virtual( alloc );
107-
108-
// /* create compact_vote_state_update with dummy values */
109-
// fd_compact_vote_state_update_t compact_vote_update = {0};
110-
// compact_vote_update.root = 100;
111-
// compact_vote_update.lockouts_len = 0;
112-
// static long now = 1715701506716580798L;
113-
// compact_vote_update.has_timestamp = 1;
114-
// compact_vote_update.timestamp = now;
115-
// FD_TEST( 32UL == getrandom( compact_vote_update.hash.key, 32UL, 0 ) );
116-
117-
// fd_hash_t recent_blockhash = { 0 };
118-
// FD_TEST( 32UL == getrandom( &recent_blockhash.uc, 32UL, 0 ) );
119-
120-
/* create the vote transaction */
121-
// uchar txn_meta_buf[FD_TXN_MAX_SZ];
122-
// uchar txn_buf[FD_TXN_MTU];
123-
124-
// /* parse the transaction back */
125-
// ushort parsed_recent_blockhash_off;
126-
// fd_compact_vote_state_update_t parsed_vote_update;
127-
// FD_TEST( FD_VOTER_OK == fd_vote_txn_parse( txn_buf,
128-
// txn_size,
129-
// valloc,
130-
// &parsed_recent_blockhash_off,
131-
// &parsed_vote_update ) );
132-
// FD_LOG_NOTICE(( "recent blockhash: %s == %s",
133-
// FD_BASE58_ENC_32_ALLOCA( recent_blockhash ),
134-
// FD_BASE58_ENC_32_ALLOCA( txn_buf + parsed_recent_blockhash_off ) ));
135-
// FD_LOG_NOTICE(( "root: %ld == %ld", compact_vote_update.root, parsed_vote_update.root ) );
136-
// FD_LOG_NOTICE(( "timestamp: %lu == %lu",
137-
// *compact_vote_update.timestamp,
138-
// *parsed_vote_update.timestamp ) );
139-
// FD_LOG_NOTICE(( "hash: %s == %s",
140-
// FD_BASE58_ENC_32_ALLOCA( compact_vote_update.hash.key ),
141-
// FD_BASE58_ENC_32_ALLOCA( parsed_vote_update.hash.key ) ));
14279
}

src/discof/consensus/.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/discof/consensus/Local.mk

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)