-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf: calculate the main chain height more efficiently (#237)
The Bitcoin testnet's metrics endpoint ran out of cycles because it had a large number of unstable blocks, and computing the main chain height under those conditions was very expensive. This commit makes that computation more efficient. Prior to this change, the `get_metrics` benchmark took `163_059_419` cycles. Now it takes `8_102_095`.
- Loading branch information
Showing
2 changed files
with
18 additions
and
1 deletion.
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