Skip to content

Commit

Permalink
runtime: fix fd_sysvar_set capitalization update
Browse files Browse the repository at this point in the history
  • Loading branch information
two-heart committed Jan 3, 2025
1 parent febafbd commit 9556f38
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/flamenco/runtime/sysvar/fd_sysvar.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ fd_sysvar_set( fd_exec_slot_ctx_t * slot_ctx,
rec->meta->info.lamports = lamports_after;

/* https://github.com/anza-xyz/agave/blob/cbc8320d35358da14d79ebcada4dfb6756ffac79/runtime/src/bank.rs#L1826 */
if ( lamports_after > lamports_before ) {
if ( lamports_after > lamports_before ) {
slot_ctx->slot_bank.capitalization += ( lamports_after - lamports_before );
} else if ( lamports_before < lamports_after ) {
} else if( lamports_after < lamports_before ) {
slot_ctx->slot_bank.capitalization -= ( lamports_before - lamports_after );
}

Expand Down

0 comments on commit 9556f38

Please sign in to comment.