Fixes for allocator + factory + misc improvements (#3534)
* Clear up import/export misunderstandings * Fetch minimum period from runtime * Remove unnecessary comment This variable is already fetched from the runtime in the line below. * Fix bug in factory The `best_block_id` stayed the same, it was always the genesis hash. This resulted in the factory failing after 4096 blocks, since `client/db` discards hashes (in this case the genesis hash) after 4096 blocks from the database. * Fix tense in error message * Improve allocator documentation * Fix bug in allocator Under certain circumstances an invalid pointer was returned: when the `ptr` was calculated as equal to the `max_heap_size`. This is an invalid pointer since there is no access allowed after the heap limit. The way to provoke this was to repeatedly allocate with sizes which were previously not allocated and immediately deallocate right afterwards. What this did was to increment the `bumper` with each allocat...
Showing
- core/cli/src/params.rs 3 additions, 1 deletioncore/cli/src/params.rs
- core/executor/src/allocator.rs 135 additions, 52 deletionscore/executor/src/allocator.rs
- core/executor/src/error.rs 2 additions, 2 deletionscore/executor/src/error.rs
- node/cli/src/factory_impl.rs 5 additions, 6 deletionsnode/cli/src/factory_impl.rs
- test-utils/transaction-factory/src/lib.rs 2 additions, 1 deletiontest-utils/transaction-factory/src/lib.rs
Please register or sign in to comment