mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
tonNode.getOutMsgQueueProof query in public shard overlays (#1413)
* tonNode.getOutMsgQueueProof query in public shard overlays * Allow responding to getOutMsgQueueProof requests one at a time only
This commit is contained in:
parent
9ae88d87e3
commit
7bc50e63d7
37 changed files with 729 additions and 51 deletions
|
@ -660,6 +660,12 @@ bool EnqueuedMsgDescr::check_key(td::ConstBitPtr key) const {
|
|||
hash_ == key + 96;
|
||||
}
|
||||
|
||||
bool ImportedMsgQueueLimits::deserialize(vm::CellSlice& cs) {
|
||||
return cs.fetch_ulong(8) == 0xd3 // imported_msg_queue_limits#d3
|
||||
&& cs.fetch_uint_to(32, max_bytes) // max_bytes:#
|
||||
&& cs.fetch_uint_to(32, max_msgs); // max_msgs:#
|
||||
}
|
||||
|
||||
bool ParamLimits::deserialize(vm::CellSlice& cs) {
|
||||
return cs.fetch_ulong(8) == 0xc3 // param_limits#c3
|
||||
&& cs.fetch_uint_to(32, limits_[0]) // underload:uint32
|
||||
|
|
|
@ -216,6 +216,16 @@ static inline std::ostream& operator<<(std::ostream& os, const MsgProcessedUptoC
|
|||
return proc_coll.print(os);
|
||||
}
|
||||
|
||||
struct ImportedMsgQueueLimits {
|
||||
// Default values
|
||||
td::uint32 max_bytes = 1 << 16;
|
||||
td::uint32 max_msgs = 30;
|
||||
bool deserialize(vm::CellSlice& cs);
|
||||
ImportedMsgQueueLimits operator*(td::uint32 x) const {
|
||||
return {max_bytes * x, max_msgs * x};
|
||||
}
|
||||
};
|
||||
|
||||
struct ParamLimits {
|
||||
enum { limits_cnt = 4 };
|
||||
enum { cl_underload = 0, cl_normal = 1, cl_soft = 2, cl_medium = 3, cl_hard = 4 };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue