crash bug vector reserve

This commit is contained in:
Richard Holland
2022-05-26 10:58:23 +00:00
parent 273ab6510b
commit 4ea852b819
2 changed files with 6 additions and 1 deletions

View File

@@ -722,7 +722,8 @@ SetHook::destroyNamespace(
uint32_t stateCount =sleAccount->getFieldU32(sfHookStateCount);
uint32_t oldStateCount = stateCount;
std::vector<uint256> toDelete {sleDir->getFieldV256(sfIndexes).size()};
std::vector<uint256> toDelete;
toDelete.reserve(sleDir->getFieldV256(sfIndexes).size());
do
{
// Make sure any directory node types that we find are the kind

View File

@@ -980,6 +980,10 @@ executeHookChain(
uint32_t flags = (hookObj->isFieldPresent(sfFlags) ?
hookObj->getFieldU32(sfFlags) : hookDef->getFieldU32(sfFlags));
JLOG(j_.trace())
<< "HookChainExecution: " << hookHash
<< " strong:" << strong << " flags&hsfCOLLECT: " << (flags & hsfCOLLECT);
// skip weakly executed hooks that lack a collect flag
if (!strong && !(flags & hsfCOLLECT))
continue;