Skip to content

Commit

Permalink
Fix EXPIRATION_ENTRY_SIZE constant
Browse files Browse the repository at this point in the history
  • Loading branch information
2opremio committed Sep 4, 2023
1 parent c38a1e5 commit 592d60d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cmd/soroban-rpc/internal/test/simulate_transaction_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ func TestSimulateTransactionSucceeds(t *testing.T) {
},
},
Instructions: 79653,
ReadBytes: 36,
ReadBytes: 48,
WriteBytes: 64,
},
RefundableFee: 20045,
Expand Down
6 changes: 3 additions & 3 deletions cmd/soroban-rpc/lib/preflight/src/fees.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ use state_expiration::{get_restored_ledger_sequence, ExpirableLedgerEntry};
use std::cmp::max;
use std::convert::{TryFrom, TryInto};

/// Estimate for any `ExpirationEntry` ledger entry, consisting of a 32-byte
/// hash of the corresponding entry and 4 bytes for expiration ledger.
const EXPIRATION_ENTRY_SIZE: u32 = 32 + 4;
// TODO: this should be imported from soroban_env_host::fees instead
/// Serialize XDR size for any `ExpirationEntry` ledger entry.
const EXPIRATION_ENTRY_SIZE: u32 = 48;

pub(crate) fn compute_host_function_transaction_data_and_min_fee(
op: &InvokeHostFunctionOp,
Expand Down

0 comments on commit 592d60d

Please sign in to comment.