-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rpc: fix multi-entry responses for getLedger entries (#1093)
The key->entry correspondence was broken since the code assumed a 1-to-1 match (in size and ordering) between the keys in the request and the keys in the response. This didn't hold because: 1. Some keys may be missing in the response (if not found in the db). 2. The db access method (`LedgerEntryReadTx.GetLedgerEntries()`) returned a result whose ordering wasn't consistent with its arguments (due to traversing a map to build the result). This change: 1. Fixes the key->entry mapping 2. Makes `getLedgerEntries` response ordering stable and consistent with the keys provided. 3. Make a few small performance improvements (mostly allocation related) along the way.
- Loading branch information
Showing
3 changed files
with
81 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters