Skip to content

Commit 0cc297b

Browse files
authored
Disable validator set cache during Merkle proof generation (#1636)
1 parent e03b110 commit 0cc297b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

crypto/block/mc-config.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -542,6 +542,11 @@ td::Result<std::shared_ptr<ValidatorSet>> Config::unpack_validator_set(Ref<vm::C
542542
if (vset_root.is_null()) {
543543
return td::Status::Error("validator set is absent");
544544
}
545+
TRY_RESULT(loaded_root, vset_root->load_cell());
546+
if (!loaded_root.tree_node.empty()) {
547+
// Do not use cache during Merkle proof generation
548+
use_cache = false;
549+
}
545550
static ValidatorSetCache cache;
546551
if (use_cache) {
547552
auto result = cache.get(vset_root->get_hash());

0 commit comments

Comments
 (0)