mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
Fix split-depth and collator
This commit is contained in:
parent
64e68a47ec
commit
6faeca69a2
2 changed files with 11 additions and 0 deletions
|
@ -395,6 +395,7 @@ bool Account::init_new(ton::UnixTime now) {
|
||||||
}
|
}
|
||||||
state_hash = addr_orig;
|
state_hash = addr_orig;
|
||||||
status = orig_status = acc_nonexist;
|
status = orig_status = acc_nonexist;
|
||||||
|
split_depth_set_ = false;
|
||||||
created = true;
|
created = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -2243,6 +2244,8 @@ Ref<vm::Cell> Transaction::commit(Account& acc) {
|
||||||
acc.tock = new_tock;
|
acc.tock = new_tock;
|
||||||
} else {
|
} else {
|
||||||
acc.tick = acc.tock = false;
|
acc.tick = acc.tock = false;
|
||||||
|
acc.split_depth_set_ = false;
|
||||||
|
acc.created = true;
|
||||||
}
|
}
|
||||||
end_lt = 0;
|
end_lt = 0;
|
||||||
acc.push_transaction(root, start_lt);
|
acc.push_transaction(root, start_lt);
|
||||||
|
|
|
@ -2298,6 +2298,10 @@ Ref<vm::Cell> Collator::create_ordinary_transaction(Ref<vm::Cell> msg_root) {
|
||||||
}
|
}
|
||||||
register_new_msgs(*trans);
|
register_new_msgs(*trans);
|
||||||
update_max_lt(acc->last_trans_end_lt_);
|
update_max_lt(acc->last_trans_end_lt_);
|
||||||
|
// temporary patch to stop producing dangerous block
|
||||||
|
if (acc->status == block::Account::acc_nonexist) {
|
||||||
|
block_full_ = true;
|
||||||
|
}
|
||||||
return trans_root;
|
return trans_root;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2447,6 +2451,10 @@ int Collator::process_one_new_message(block::NewOutMsg msg, bool enqueue_only, R
|
||||||
if (!insert_out_msg(cb.finalize())) {
|
if (!insert_out_msg(cb.finalize())) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
// 6.5. check for temporary patch can be left here
|
||||||
|
if (block_full_) {
|
||||||
|
return 3;
|
||||||
|
}
|
||||||
// 7. check whether the block is full now
|
// 7. check whether the block is full now
|
||||||
if (!block_limit_status_->fits(block::ParamLimits::cl_normal)) {
|
if (!block_limit_status_->fits(block::ParamLimits::cl_normal)) {
|
||||||
block_full_ = true;
|
block_full_ = true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue