mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
updated tonlib + fixes in vm
This commit is contained in:
parent
28735ddc9e
commit
efd47af432
42 changed files with 750 additions and 307 deletions
|
@ -97,26 +97,12 @@ void ApplyBlock::got_block_handle(BlockHandle handle) {
|
|||
written_block_data();
|
||||
return;
|
||||
}
|
||||
if (handle_->id().is_masterchain() && !handle_->inited_proof()) {
|
||||
abort_query(td::Status::Error(ErrorCode::notready, "proof is absent"));
|
||||
return;
|
||||
}
|
||||
if (!handle_->id().is_masterchain() && !handle_->inited_proof_link()) {
|
||||
abort_query(td::Status::Error(ErrorCode::notready, "proof link is absent"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (handle_->is_archived()) {
|
||||
finish_query();
|
||||
return;
|
||||
}
|
||||
|
||||
CHECK(handle_->inited_merge_before());
|
||||
CHECK(handle_->inited_split_after());
|
||||
CHECK(handle_->inited_prev());
|
||||
CHECK(handle_->inited_state_root_hash());
|
||||
CHECK(handle_->inited_logical_time());
|
||||
|
||||
if (handle_->received()) {
|
||||
written_block_data();
|
||||
return;
|
||||
|
@ -149,6 +135,19 @@ void ApplyBlock::got_block_handle(BlockHandle handle) {
|
|||
|
||||
void ApplyBlock::written_block_data() {
|
||||
VLOG(VALIDATOR_DEBUG) << "apply block: written block data for " << id_;
|
||||
if (handle_->id().is_masterchain() && !handle_->inited_proof()) {
|
||||
abort_query(td::Status::Error(ErrorCode::notready, "proof is absent"));
|
||||
return;
|
||||
}
|
||||
if (!handle_->id().is_masterchain() && !handle_->inited_proof_link()) {
|
||||
abort_query(td::Status::Error(ErrorCode::notready, "proof link is absent"));
|
||||
return;
|
||||
}
|
||||
CHECK(handle_->inited_merge_before());
|
||||
CHECK(handle_->inited_split_after());
|
||||
CHECK(handle_->inited_prev());
|
||||
CHECK(handle_->inited_state_root_hash());
|
||||
CHECK(handle_->inited_logical_time());
|
||||
if (handle_->is_applied() && handle_->processed()) {
|
||||
finish_query();
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue