-
Notifications
You must be signed in to change notification settings - Fork 140
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: make it possible to construct a GasDuration (#1898)
This lets us construct "gas charge" objects with constant times (for tracing). - Use an explicit enum with 3 options to avoid allocating/using an Arc+OnceCell when we don't need it. - Implement Debug manually to hide implementation details. - Change the assertion inside `GasTimer::new` to "debug only". If someone passes a "filled" duration, treat the gas timer as a no-op.
- Loading branch information
Showing
1 changed file
with
38 additions
and
8 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