Skip to content

Commit

Permalink
Account for write entries as read entries too
Browse files Browse the repository at this point in the history
  • Loading branch information
2opremio committed Jul 10, 2023
1 parent bb680b8 commit 06de64e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmd/soroban-rpc/lib/preflight/src/fees.rs
Original file line number Diff line number Diff line change
Expand Up @@ -350,10 +350,11 @@ pub(crate) fn compute_restore_footprint_transaction_data_and_min_fee(
write_bytes,
extended_meta_data_size_bytes: 2 * write_bytes,
};
let entry_count = u32::try_from(soroban_resources.footprint.read_write.as_vec().len())?
let transaction_resources = TransactionResources {
instructions: 0,
read_entries: 0,
write_entries: u32::try_from(soroban_resources.footprint.read_write.as_vec().len())?,
read_entries: entry_count,
write_entries: entry_count,
read_bytes: 0,
write_bytes: soroban_resources.write_bytes,
metadata_size_bytes: soroban_resources.extended_meta_data_size_bytes,
Expand Down

0 comments on commit 06de64e

Please sign in to comment.