1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-03-09 15:40:10 +00:00

Fix generating block header proof (#841)

Co-authored-by: SpyCheese <mikle98@yandex.ru>
This commit is contained in:
EmelyanenkoK 2023-12-28 17:40:54 +03:00 committed by GitHub
parent 550c28d7db
commit 6c615a105a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1034,7 +1034,8 @@ bool LiteQuery::make_state_root_proof(Ref<vm::Cell>& proof, Ref<vm::Cell> state_
vm::MerkleProofBuilder pb{std::move(block_root)};
block::gen::Block::Record blk;
block::gen::BlockInfo::Record info;
if (!(tlb::unpack_cell(pb.root(), blk) && tlb::unpack_cell(blk.info, info))) {
if (!(tlb::unpack_cell(pb.root(), blk) && tlb::unpack_cell(blk.info, info) &&
block::gen::BlkPrevInfo(info.after_merge).validate_ref(info.prev_ref))) {
return fatal_error("cannot unpack block header");
}
vm::CellSlice upd_cs{vm::NoVmSpec(), blk.state_update};