Skip to content

Commit bb7b0af

Browse files
two-heartripatel-fd
authored andcommitted
gui: fix inverted live table treap active condition
1 parent 5586448 commit bb7b0af

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/disco/gui/fd_gui_live_table_tmpl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ LIVE_TABLE_(leave)( LIVE_TABLE_(t) * join ) {
607607

608608
LIVE_TABLE_(private_dlist_delete)( LIVE_TABLE_(private_dlist_leave)( join->dlist ) );
609609
for( ulong i=0; i<LIVE_TABLE_MAX_SORT_KEY_CNT; i++ ) {
610-
if( FD_LIKELY( join->treaps_is_active[ i ] ) ) continue;
610+
if( FD_LIKELY( !join->treaps_is_active[ i ] ) ) continue;
611611
LIVE_TABLE_(private_active_sort_key_idx) = i;
612612
FD_TEST( LIVE_TABLE_(private_treap_delete)( LIVE_TABLE_(private_treap_leave)( join->treaps[ i ] ) ) );
613613
}

src/disco/gui/test_live_table.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,8 @@ main( int argc, char ** argv ) {
156156
FD_TEST( 1==test_live_table_lt( &(test_live_table_sort_key_t){ .col = { 0, 1, 2 }, .dir = { 0, 1, 0 } }, &(test_live_table_row_t){ .key = { .uc = { 1UL } }, .ipv4 = 0, .counter = 1 }, &(test_live_table_row_t){ .key = { .uc = { 0UL } }, .ipv4 = 1, .counter = 0 } ) );
157157
FD_TEST( 0==test_live_table_lt( &(test_live_table_sort_key_t){ .col = { 0, 1, 2 }, .dir = { 0, 1, 0 } }, &(test_live_table_row_t){ .key = { .uc = { 0UL } }, .ipv4 = 1, .counter = 0 }, &(test_live_table_row_t){ .key = { .uc = { 1UL } }, .ipv4 = 0, .counter = 1 } ) );
158158

159+
FD_TEST( test_live_table_delete( test_live_table_leave( table ) ) );
160+
159161
FD_LOG_INFO(( "PASSED" ));
160162
return 0;
161163
}

0 commit comments

Comments
 (0)