Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: guarantee proper lifetime for temporary Rules object: (XRPLF#4917)
* Commit 01c37fe introduced a change to the STTx unit test where a local "defaultRules" object was created with a temporary inline "presets" value provided to the ctor. Rules::Impl stores a const ref to the presets provided to the ctor. This particular call provided an inline temp variable, which goes out of scope as soon as the object is created. On Windows, attempting to use the presets (e.g. via the enabled() function) causes an access violation, which crashes the test run. * An audit of the code indicates that all other instances of Rules use the Application's config.features list, which will have a sufficient lifetime.
- Loading branch information