diff --git a/src/test/protocol/STTx_test.cpp b/src/test/protocol/STTx_test.cpp index 4ef30fb7a74..f41c283e3ab 100644 --- a/src/test/protocol/STTx_test.cpp +++ b/src/test/protocol/STTx_test.cpp @@ -1591,7 +1591,11 @@ class STTx_test : public beast::unit_test::suite }); j.sign(keypair.first, keypair.second); - Rules defaultRules{{}}; + // Rules store a reference to the presets. Create a local to guarantee + // proper lifetime. + std::unordered_set> const presets; + Rules const defaultRules{presets}; + BEAST_EXPECT(!defaultRules.enabled(featureExpandedSignerList)); unexpected( !j.checkSign(STTx::RequireFullyCanonicalSig::yes, defaultRules),