Skip to content

Commit

Permalink
Move a note on performance
Browse files Browse the repository at this point in the history
  • Loading branch information
upbqdn committed Dec 10, 2024
1 parent 37d1a44 commit 2c342f7
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions zebra-rpc/src/methods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -742,6 +742,11 @@ where
.boxed()
}

// # Performance
//
// `lightwalletd` calls this RPC with verosity 1 for its initial sync of 2 million blocks, the
// performace of this RPC with verbosity 1 significantly affects `lightwalletd`s sync time.

Check failure on line 748 in zebra-rpc/src/methods.rs

View workflow job for this annotation

GitHub Actions / codespell

performace ==> performance
//
// TODO:
// - use `height_from_signed_int()` to handle negative heights
// (this might be better in the state request, because it needs the state height)
Expand Down Expand Up @@ -770,10 +775,6 @@ where
.map_error(server::error::LegacyCode::InvalidParameter)?;

if verbosity == 0 {
// # Performance
//
// This RPC is used in `lightwalletd`'s initial sync of 2 million blocks,
// so it needs to load block data very efficiently.
let request = zebra_state::ReadRequest::Block(hash_or_height);
let response = state
.ready()
Expand Down

0 comments on commit 2c342f7

Please sign in to comment.