mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
Check limits in validate-query, check timeout in collator (#469)
This commit is contained in:
parent
caffdbb5ba
commit
580884033b
5 changed files with 37 additions and 5 deletions
|
@ -2265,9 +2265,15 @@ bool Transaction::would_fit(unsigned cls, const block::BlockLimitStatus& blimst)
|
|||
return blimst.would_fit(cls, end_lt, gas_used(), &extra);
|
||||
}
|
||||
|
||||
bool Transaction::update_limits(block::BlockLimitStatus& blimst) const {
|
||||
return blimst.update_lt(end_lt) && blimst.update_gas(gas_used()) && blimst.add_proof(new_total_state) &&
|
||||
blimst.add_cell(root) && blimst.add_transaction() && blimst.add_account(is_first);
|
||||
bool Transaction::update_limits(block::BlockLimitStatus& blimst, bool with_size) const {
|
||||
if (!(blimst.update_lt(end_lt) && blimst.update_gas(gas_used()))) {
|
||||
return false;
|
||||
}
|
||||
if (with_size) {
|
||||
return blimst.add_proof(new_total_state) && blimst.add_cell(root) && blimst.add_transaction() &&
|
||||
blimst.add_account(is_first);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue