Skip to content
Snippets Groups Projects

Eliminate all Instances of `Weight::zero()`

Merged Benjamin Gallois requested to merge bgallois/duniter-v2s:fix_weights into master
1 file
+ 2
0
Compare changes
  • Side-by-side
  • Inline
@@ -89,3 +89,5 @@ When designing handlers and internal functions, it is advisable to avoid having
@@ -89,3 +89,5 @@ When designing handlers and internal functions, it is advisable to avoid having
1. **Simplified Benchmarking**: Writing benchmarks for hooks or calls where handlers and internal functions are utilized becomes more straightforward.
1. **Simplified Benchmarking**: Writing benchmarks for hooks or calls where handlers and internal functions are utilized becomes more straightforward.
2. **Reduced Benchmarking Complexity**: By directly measuring execution and overhead in a single pass, the number of benchmarks is minimized.
2. **Reduced Benchmarking Complexity**: By directly measuring execution and overhead in a single pass, the number of benchmarks is minimized.
3. **Enhanced Readability**: Understanding that weight accounting occurs at the outermost level improves the overall readability of the code.
3. **Enhanced Readability**: Understanding that weight accounting occurs at the outermost level improves the overall readability of the code.
 
 
One notable exception is the internal functions called in hooks like `on_idle` or `on_initialize` that can be easier to benchmark separately when the hook contains numerous branching.
Loading