Skip to content

Commit 9d94846

Browse files
committed
funk: stricter handholding checks
Crash if handholding checks fail instead of logging warning Remove unused 'verbose' argument
1 parent 51d8f95 commit 9d94846

File tree

14 files changed

+72
-116
lines changed

14 files changed

+72
-116
lines changed

src/discof/replay/fd_replay_tile.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ funk_publish( fd_replay_tile_ctx_t * ctx,
456456
/* This is the standard case. Publish all transactions up to and
457457
including the watermark. This will publish any in-prep ancestors
458458
of root_txn as well. */
459-
if( FD_UNLIKELY( !fd_funk_txn_publish( ctx->funk, to_root_txn, 1 ) ) ) {
459+
if( FD_UNLIKELY( !fd_funk_txn_publish( ctx->funk, to_root_txn ) ) ) {
460460
FD_LOG_ERR(( "failed to funk publish slot %lu", wmk ));
461461
}
462462
fd_funk_txn_end_write( ctx->funk );
@@ -1297,9 +1297,7 @@ handle_new_slot( fd_replay_tile_ctx_t * ctx,
12971297
fd_funk_txn_t * parent_txn = fd_funk_txn_query( &parent_xid, txn_map );
12981298

12991299
fd_funk_txn_t * funk_txn = fd_funk_txn_prepare( ctx->funk, parent_txn, &xid, 1 );
1300-
if( FD_UNLIKELY( !funk_txn ) ) {
1301-
FD_LOG_CRIT(( "invariant violation: funk_txn is NULL for slot %lu", slot ));
1302-
}
1300+
if( FD_UNLIKELY( !funk_txn ) ) FD_LOG_ERR(( "fd_funk_txn_prepare failed" ));
13031301

13041302
ctx->slot_ctx->funk_txn = funk_txn;
13051303

src/discof/restore/fd_snapin_tile.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ handle_control_frag( fd_snapin_tile_t * ctx,
226226
ctx->full = 0;
227227
fd_snapshot_parser_reset( ctx->ssparse, fd_chunk_to_laddr( ctx->manifest_out.wksp, ctx->manifest_out.chunk ), ctx->manifest_out.mtu );
228228
if( FD_UNLIKELY( !ctx->funk_txn ) ) fd_funk_txn_cancel_root( ctx->funk );
229-
else fd_funk_txn_cancel( ctx->funk, ctx->funk_txn, 0 );
229+
else fd_funk_txn_cancel( ctx->funk, ctx->funk_txn );
230230
ctx->state = FD_SNAPIN_STATE_LOADING;
231231
break;
232232
case FD_SNAPSHOT_MSG_CTRL_EOF_FULL:
@@ -241,6 +241,7 @@ handle_control_frag( fd_snapin_tile_t * ctx,
241241

242242
fd_funk_txn_xid_t incremental_xid = fd_funk_generate_xid();
243243
ctx->funk_txn = fd_funk_txn_prepare( ctx->funk, ctx->funk_txn, &incremental_xid, 0 );
244+
if( FD_UNLIKELY( !ctx->funk_txn ) ) FD_LOG_ERR(( "fd_funk_txn_prepare failed" ));
244245
ctx->full = 0;
245246
ctx->state = FD_SNAPIN_STATE_LOADING;
246247
break;
@@ -251,7 +252,7 @@ handle_control_frag( fd_snapin_tile_t * ctx,
251252
break;
252253
}
253254

254-
if( FD_LIKELY( ctx->funk_txn ) ) fd_funk_txn_publish_into_parent( ctx->funk, ctx->funk_txn, 0 );
255+
if( FD_LIKELY( ctx->funk_txn ) ) fd_funk_txn_publish_into_parent( ctx->funk, ctx->funk_txn );
255256
fd_stem_publish( stem, 0UL, fd_ssmsg_sig( FD_SSMSG_DONE, 0UL ), 0UL, 0UL, 0UL, 0UL, 0UL );
256257
break;
257258
case FD_SNAPSHOT_MSG_CTRL_SHUTDOWN:

src/flamenco/runtime/fd_runtime.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1954,6 +1954,7 @@ fd_migrate_builtin_to_core_bpf( fd_exec_slot_ctx_t * slot_ctx,
19541954
fd_funk_txn_xid_t migration_xid = fd_funk_generate_xid();
19551955
fd_funk_txn_start_write( slot_ctx->funk );
19561956
slot_ctx->funk_txn = fd_funk_txn_prepare( slot_ctx->funk, slot_ctx->funk_txn, &migration_xid, 0UL );
1957+
if( FD_UNLIKELY( !slot_ctx->funk_txn ) ) FD_LOG_ERR(( "fd_funk_txn_prepare failed" ));
19571958
fd_funk_txn_end_write( slot_ctx->funk );
19581959

19591960
/* Attempt serialization of program account. If the program is
@@ -2080,15 +2081,15 @@ fd_migrate_builtin_to_core_bpf( fd_exec_slot_ctx_t * slot_ctx,
20802081
should not be invokable until the next slot. The cache entry will be created at the end of the
20812082
block as a part of the finalize routine. */
20822083
fd_funk_txn_start_write( slot_ctx->funk );
2083-
fd_funk_txn_publish_into_parent( slot_ctx->funk, slot_ctx->funk_txn, 1 );
2084+
fd_funk_txn_publish_into_parent( slot_ctx->funk, slot_ctx->funk_txn );
20842085
fd_funk_txn_end_write( slot_ctx->funk );
20852086
slot_ctx->funk_txn = parent_txn;
20862087
return;
20872088

20882089
fail:
20892090
/* Cancel the in-preparation transaction and discard any in-progress changes. */
20902091
fd_funk_txn_start_write( slot_ctx->funk );
2091-
fd_funk_txn_cancel( slot_ctx->funk, slot_ctx->funk_txn, 0UL );
2092+
fd_funk_txn_cancel( slot_ctx->funk, slot_ctx->funk_txn );
20922093
fd_funk_txn_end_write( slot_ctx->funk );
20932094
slot_ctx->funk_txn = parent_txn;
20942095
}
@@ -2804,6 +2805,7 @@ fd_runtime_read_genesis( fd_exec_slot_ctx_t * slot_ctx,
28042805
xid.ul[1] = 0UL;
28052806
xid.ul[0] = 0UL;
28062807
slot_ctx->funk_txn = fd_funk_txn_prepare( slot_ctx->funk, NULL, &xid, 1 );
2808+
if( FD_UNLIKELY( !slot_ctx->funk_txn ) ) FD_LOG_ERR(( "fd_funk_txn_prepare failed" ));
28072809
fd_funk_txn_end_write( slot_ctx->funk );
28082810

28092811
fd_runtime_init_bank_from_genesis( slot_ctx,

src/flamenco/runtime/program/test_program_cache.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ test_account_does_not_exist( void ) {
130130
int err = fd_program_cache_load_entry( test_funk, funk_txn, &non_existent_pubkey, &valid_prog );
131131
FD_TEST( err==-1 ); /* Should not exist */
132132

133-
fd_funk_txn_cancel( test_funk, funk_txn, 0 );
133+
fd_funk_txn_cancel( test_funk, funk_txn );
134134
}
135135

136136
/* Test 2: Account exists but is not owned by a BPF loader */
@@ -156,7 +156,7 @@ test_account_not_bpf_loader_owner( void ) {
156156
int err = fd_program_cache_load_entry( test_funk, funk_txn, &test_program_pubkey, &valid_prog );
157157
FD_TEST( err==-1 ); /* Should not exist */
158158

159-
fd_funk_txn_cancel( test_funk, funk_txn, 0 );
159+
fd_funk_txn_cancel( test_funk, funk_txn );
160160
}
161161

162162
/* Test 3: Program is not in cache yet (first time), but program fails validations */
@@ -186,7 +186,7 @@ test_invalid_program_not_in_cache_first_time( void ) {
186186
FD_TEST( valid_prog->failed_verification );
187187
FD_TEST( valid_prog->last_slot_verified==fd_bank_slot_get( test_slot_ctx->bank ) );
188188

189-
fd_funk_txn_cancel( test_funk, funk_txn, 0 );
189+
fd_funk_txn_cancel( test_funk, funk_txn );
190190
}
191191

192192
/* Test 4: Program is not in cache yet (first time), but program passes validations */
@@ -216,7 +216,7 @@ test_valid_program_not_in_cache_first_time( void ) {
216216
FD_TEST( !valid_prog->failed_verification );
217217
FD_TEST( valid_prog->last_slot_verified==fd_bank_slot_get( test_slot_ctx->bank ) );
218218

219-
fd_funk_txn_cancel( test_funk, funk_txn, 0 );
219+
fd_funk_txn_cancel( test_funk, funk_txn );
220220
}
221221

222222
/* Test 5: Program is in cache but needs reverification
@@ -263,7 +263,7 @@ test_program_in_cache_needs_reverification( void ) {
263263
FD_TEST( valid_prog->last_slot_verified==fd_bank_slot_get( test_slot_ctx->bank ) );
264264
FD_TEST( valid_prog->last_slot_modified==0UL );
265265

266-
fd_funk_txn_cancel( test_funk, funk_txn, 0 );
266+
fd_funk_txn_cancel( test_funk, funk_txn );
267267
}
268268

269269
/* Test 6: Program is in cache and was just modified, so it should be
@@ -330,7 +330,7 @@ test_program_in_cache_queued_for_reverification( void ) {
330330
FD_TEST( valid_prog->last_slot_modified==future_slot );
331331
FD_TEST( valid_prog->last_slot_verified==future_slot );
332332

333-
fd_funk_txn_cancel( test_funk, funk_txn, 0 );
333+
fd_funk_txn_cancel( test_funk, funk_txn );
334334
}
335335

336336
/* Test 7: Program queued for reverification but program doesn't exist
@@ -368,7 +368,7 @@ test_program_queued_for_reverification_account_does_not_exist( void ) {
368368
err = fd_program_cache_load_entry( test_funk, funk_txn, &test_program_pubkey, &valid_prog );
369369
FD_TEST( err ); /* Should not exist */
370370

371-
fd_funk_txn_cancel( test_funk, funk_txn, 0 );
371+
fd_funk_txn_cancel( test_funk, funk_txn );
372372
}
373373

374374
/* Test 8: Program is in cache and was just modified and queued for
@@ -441,7 +441,7 @@ test_program_in_cache_queued_for_reverification_and_processed( void ) {
441441
FD_TEST( valid_prog->last_slot_verified==future_update_slot );
442442
FD_TEST( valid_prog->last_slot_modified==future_slot );
443443

444-
fd_funk_txn_cancel( test_funk, funk_txn, 0 );
444+
fd_funk_txn_cancel( test_funk, funk_txn );
445445
}
446446

447447
/* Test 9: Genesis program fails verification, and is reverified later */
@@ -491,7 +491,7 @@ test_invalid_genesis_program_reverified_after_genesis( void ) {
491491
FD_TEST( valid_prog->last_slot_verified==future_slot );
492492
FD_TEST( valid_prog->last_slot_modified==0UL );
493493

494-
fd_funk_txn_cancel( test_funk, funk_txn, 0 );
494+
fd_funk_txn_cancel( test_funk, funk_txn );
495495
}
496496

497497
/* Test 10: Genesis program passes verification, and is reverified
@@ -542,7 +542,7 @@ test_valid_genesis_program_reverified_after_genesis( void ) {
542542
FD_TEST( valid_prog->last_slot_verified==future_slot );
543543
FD_TEST( valid_prog->last_slot_modified==0UL );
544544

545-
fd_funk_txn_cancel( test_funk, funk_txn, 0 );
545+
fd_funk_txn_cancel( test_funk, funk_txn );
546546
}
547547

548548
/* Test 11: Program gets upgraded with a larger programdata size */
@@ -624,7 +624,7 @@ test_program_upgraded_with_larger_programdata( void ) {
624624
FD_TEST( valid_prog->last_slot_verified==future_slot );
625625
FD_TEST( valid_prog->last_slot_modified==future_slot );
626626

627-
fd_funk_txn_cancel( test_funk, funk_txn, 0 );
627+
fd_funk_txn_cancel( test_funk, funk_txn );
628628
}
629629

630630
int

src/flamenco/runtime/tests/harness/fd_block_harness.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ fd_runtime_fuzz_block_update_prev_epoch_votes_cache( fd_vote_accounts_pair_globa
182182
static void
183183
fd_runtime_fuzz_block_ctx_destroy( fd_runtime_fuzz_runner_t * runner,
184184
fd_wksp_t * wksp ) {
185-
fd_funk_txn_cancel_all( runner->funk, 1 );
185+
fd_funk_txn_cancel_all( runner->funk );
186186
fd_wksp_detach( wksp );
187187
}
188188

@@ -205,6 +205,7 @@ fd_runtime_fuzz_block_ctx_create( fd_runtime_fuzz_runner_t * runner,
205205
/* Create temporary funk transaction and slot / epoch contexts */
206206
fd_funk_txn_start_write( funk );
207207
fd_funk_txn_t * funk_txn = fd_funk_txn_prepare( funk, NULL, xid, 1 );
208+
if( FD_UNLIKELY( !funk_txn ) ) FD_LOG_ERR(( "fd_funk_txn_prepare failed" ));
208209
fd_funk_txn_end_write( funk );
209210

210211
/* Allocate contexts */
@@ -400,6 +401,7 @@ fd_runtime_fuzz_block_ctx_create( fd_runtime_fuzz_runner_t * runner,
400401
fd_funk_txn_xid_t fork_xid = { .ul = { slot, slot } };
401402
fd_funk_txn_start_write( funk );
402403
slot_ctx->funk_txn = fd_funk_txn_prepare( funk, slot_ctx->funk_txn, &fork_xid, 1 );
404+
if( FD_UNLIKELY( !slot_ctx->funk_txn ) ) FD_LOG_ERR(( "fd_funk_txn_prepare failed" ));
403405
fd_funk_txn_end_write( funk );
404406

405407
/* Reset the lthash to zero, because we are in a new Funk transaction now */

src/flamenco/runtime/tests/harness/fd_instr_harness.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ fd_runtime_fuzz_instr_ctx_create( fd_runtime_fuzz_runner_t * runner,
3030

3131
fd_funk_txn_start_write( funk );
3232
fd_funk_txn_t * funk_txn = fd_funk_txn_prepare( funk, NULL, xid, 1 );
33+
if( FD_UNLIKELY( !funk_txn ) ) FD_LOG_ERR(( "fd_funk_txn_prepare failed" ));
3334
fd_funk_txn_end_write( funk );
3435

3536
/* Allocate contexts */
@@ -384,7 +385,7 @@ fd_runtime_fuzz_instr_ctx_destroy( fd_runtime_fuzz_runner_t * runner,
384385
if( !ctx ) return;
385386
fd_funk_txn_t * funk_txn = ctx->txn_ctx->funk_txn;
386387

387-
fd_funk_txn_cancel( runner->funk, funk_txn, 1 );
388+
fd_funk_txn_cancel( runner->funk, funk_txn );
388389
}
389390

390391

src/flamenco/runtime/tests/harness/fd_txn_harness.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ fd_runtime_fuzz_txn_ctx_destroy( fd_runtime_fuzz_runner_t * runner,
77
if( !slot_ctx ) return; // This shouldn't be false either
88
fd_funk_txn_t * funk_txn = slot_ctx->funk_txn;
99

10-
fd_funk_txn_cancel( runner->funk, funk_txn, 1 );
10+
fd_funk_txn_cancel( runner->funk, funk_txn );
1111
}
1212

1313
/* Creates transaction execution context for a single test case. Returns a
@@ -25,6 +25,7 @@ fd_runtime_fuzz_txn_ctx_create( fd_runtime_fuzz_runner_t * runner,
2525
fd_funk_txn_xid_t xid = { .ul = { slot, slot } };
2626
fd_funk_txn_start_write( funk );
2727
fd_funk_txn_t * funk_txn = fd_funk_txn_prepare( funk, NULL, &xid, 1 );
28+
if( FD_UNLIKELY( !funk_txn ) ) FD_LOG_ERR(( "fd_funk_txn_prepare failed" ));
2829
fd_funk_txn_end_write( funk );
2930

3031
/* Set up slot context */

src/funk/fd_funk_txn.c

Lines changed: 26 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -52,21 +52,13 @@ fd_funk_txn_prepare( fd_funk_t * funk,
5252
int verbose ) {
5353

5454
#ifdef FD_FUNK_HANDHOLDING
55-
if( FD_UNLIKELY( !funk ) ) {
56-
if( FD_UNLIKELY( verbose ) ) FD_LOG_WARNING(( "NULL funk" ));
57-
return NULL;
58-
}
59-
if( FD_UNLIKELY( !xid ) ) {
60-
if( FD_UNLIKELY( verbose ) ) FD_LOG_WARNING(( "NULL xid" ));
61-
return NULL;
62-
}
55+
if( FD_UNLIKELY( !funk ) ) FD_LOG_CRIT(( "NULL funk" ));
56+
if( FD_UNLIKELY( !xid ) ) FD_LOG_CRIT(( "NULL xid" ));
6357
if( FD_UNLIKELY( parent && !fd_funk_txn_valid( funk, parent ) ) ) {
64-
if( FD_UNLIKELY( verbose ) ) FD_LOG_WARNING(( "bad txn" ));
65-
return NULL;
58+
FD_LOG_CRIT(( "invalid parent txn" ));
6659
}
6760
if( FD_UNLIKELY( fd_funk_txn_xid_eq_root( xid ) ) ) {
68-
if( FD_UNLIKELY( verbose ) ) FD_LOG_WARNING(( "xid is the root" ));
69-
return NULL;
61+
FD_LOG_CRIT(( "attempted txn_prepare at root" ));
7062
}
7163
if( FD_UNLIKELY( fd_funk_txn_xid_eq( xid, funk->shmem->last_publish ) ) ) {
7264
if( FD_UNLIKELY( verbose ) ) FD_LOG_WARNING(( "xid is the last published" ));
@@ -270,20 +262,14 @@ fd_funk_txn_cancel_family( fd_funk_t * funk,
270262

271263
ulong
272264
fd_funk_txn_cancel( fd_funk_t * funk,
273-
fd_funk_txn_t * txn,
274-
int verbose ) {
265+
fd_funk_txn_t * txn ) {
275266

276267
#ifdef FD_FUNK_HANDHOLDING
277-
if( FD_UNLIKELY( !funk ) ) {
278-
if( FD_UNLIKELY( verbose ) ) FD_LOG_WARNING(( "NULL funk" ));
279-
return 0UL;
280-
}
268+
if( FD_UNLIKELY( !funk ) ) FD_LOG_CRIT(( "NULL funk" ));
269+
if( FD_UNLIKELY( !txn ) ) FD_LOG_CRIT(( "NULL txn" ));
281270
if( FD_UNLIKELY( !fd_funk_txn_valid( funk, txn ) ) ) {
282-
if( FD_UNLIKELY( verbose ) ) FD_LOG_WARNING(( "bad txn" ));
283-
return 0UL;
271+
FD_LOG_CRIT(( "invalid txn" ));
284272
}
285-
#else
286-
(void)verbose;
287273
#endif
288274

289275
ulong txn_idx = (ulong)(txn - funk->txn_pool->ele);
@@ -359,20 +345,14 @@ fd_funk_txn_cancel_sibling_list( fd_funk_t * funk,
359345

360346
ulong
361347
fd_funk_txn_cancel_siblings( fd_funk_t * funk,
362-
fd_funk_txn_t * txn,
363-
int verbose ) {
348+
fd_funk_txn_t * txn ) {
364349

365350
#ifdef FD_FUNK_HANDHOLDING
366-
if( FD_UNLIKELY( !funk ) ) {
367-
if( FD_UNLIKELY( verbose ) ) FD_LOG_WARNING(( "NULL funk" ));
368-
return 0UL;
369-
}
351+
if( FD_UNLIKELY( !funk ) ) FD_LOG_CRIT(( "NULL funk" ));
352+
if( FD_UNLIKELY( !txn ) ) FD_LOG_CRIT(( "NULL txn" ));
370353
if( FD_UNLIKELY( !fd_funk_txn_valid( funk, txn ) ) ) {
371-
if( FD_UNLIKELY( verbose ) ) FD_LOG_WARNING(( "bad txn" ));
372-
return 0UL;
354+
FD_LOG_CRIT(( "invalid txn" ));
373355
}
374-
#else
375-
(void)verbose;
376356
#endif
377357

378358
ulong txn_idx = (ulong)(txn - funk->txn_pool->ele);
@@ -384,20 +364,14 @@ fd_funk_txn_cancel_siblings( fd_funk_t * funk,
384364

385365
ulong
386366
fd_funk_txn_cancel_children( fd_funk_t * funk,
387-
fd_funk_txn_t * txn,
388-
int verbose ) {
367+
fd_funk_txn_t * txn ) {
389368

390369
#ifdef FD_FUNK_HANDHOLDING
391-
if( FD_UNLIKELY( !funk ) ) {
392-
if( FD_UNLIKELY( verbose ) ) FD_LOG_WARNING(( "NULL funk" ));
393-
return 0UL;
394-
}
370+
if( FD_UNLIKELY( !funk ) ) FD_LOG_CRIT(( "NULL funk" ));
371+
if( FD_UNLIKELY( !txn ) ) FD_LOG_CRIT(( "NULL txn" ));
395372
if( FD_UNLIKELY( !fd_funk_txn_valid( funk, txn ) ) ) {
396-
if( FD_UNLIKELY( verbose ) ) FD_LOG_WARNING(( "bad txn" ));
397-
return 0UL;
373+
FD_LOG_CRIT(( "invalid txn" ));
398374
}
399-
#else
400-
(void)verbose;
401375
#endif
402376

403377
ulong oldest_idx;
@@ -445,9 +419,8 @@ fd_funk_txn_cancel_root( fd_funk_t * funk ) {
445419
/* Cancel all outstanding transactions */
446420

447421
ulong
448-
fd_funk_txn_cancel_all( fd_funk_t * funk,
449-
int verbose ) {
450-
return fd_funk_txn_cancel_children( funk, NULL, verbose );
422+
fd_funk_txn_cancel_all( fd_funk_t * funk ) {
423+
return fd_funk_txn_cancel_children( funk, NULL );
451424
}
452425

453426
/* fd_funk_txn_update applies the record updates in transaction txn_idx
@@ -618,20 +591,13 @@ fd_funk_txn_publish_funk_child( fd_funk_t * const funk,
618591

619592
ulong
620593
fd_funk_txn_publish( fd_funk_t * funk,
621-
fd_funk_txn_t * txn,
622-
int verbose ) {
623-
594+
fd_funk_txn_t * txn ) {
624595
#ifdef FD_FUNK_HANDHOLDING
625-
if( FD_UNLIKELY( !funk ) ) {
626-
if( FD_UNLIKELY( verbose ) ) FD_LOG_WARNING(( "NULL funk" ));
627-
return 0UL;
628-
}
596+
if( FD_UNLIKELY( !funk ) ) FD_LOG_CRIT(( "NULL funk" ));
597+
if( FD_UNLIKELY( !txn ) ) FD_LOG_CRIT(( "NULL txn" ));
629598
if( FD_UNLIKELY( !fd_funk_txn_valid( funk, txn ) ) ) {
630-
if( FD_UNLIKELY( verbose ) ) FD_LOG_WARNING(( "bad txn" ));
631-
return 0UL;
599+
FD_LOG_CRIT(( "invalid txn" ));
632600
}
633-
#else
634-
(void)verbose;
635601
#endif
636602

637603
ulong txn_idx = (ulong)(txn - funk->txn_pool->ele);
@@ -683,19 +649,13 @@ fd_funk_txn_publish( fd_funk_t * funk,
683649

684650
int
685651
fd_funk_txn_publish_into_parent( fd_funk_t * funk,
686-
fd_funk_txn_t * txn,
687-
int verbose ) {
652+
fd_funk_txn_t * txn ) {
688653
#ifdef FD_FUNK_HANDHOLDING
689-
if( FD_UNLIKELY( !funk ) ) {
690-
if( FD_UNLIKELY( verbose ) ) FD_LOG_WARNING(( "NULL funk" ));
691-
return FD_FUNK_ERR_INVAL;
692-
}
654+
if( FD_UNLIKELY( !funk ) ) FD_LOG_CRIT(( "NULL funk" ));
655+
if( FD_UNLIKELY( !txn ) ) FD_LOG_CRIT(( "NULL txn" ));
693656
if( FD_UNLIKELY( !fd_funk_txn_valid( funk, txn ) ) ) {
694-
if( FD_UNLIKELY( verbose ) ) FD_LOG_WARNING(( "bad txn" ));
695-
return 0UL;
657+
FD_LOG_CRIT(( "invalid txn" ));
696658
}
697-
#else
698-
(void)verbose;
699659
#endif
700660

701661
fd_funk_txn_map_t * txn_map = funk->txn_map;

0 commit comments

Comments
 (0)