mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
Improve large OutMsgQueue clearance (#822)
* Improve Collator::opt_msg_queue_cleanup, increase collator timeout * Disable importing ext msgs if queue is too big * Extend timeout in collator if previous block is too old --------- Co-authored-by: SpyCheese <mikle98@yandex.ru>
This commit is contained in:
parent
51baec48a0
commit
7fcf267717
6 changed files with 105 additions and 25 deletions
|
@ -110,6 +110,7 @@ class Timestamp {
|
|||
}
|
||||
|
||||
friend bool operator==(Timestamp a, Timestamp b);
|
||||
friend Timestamp &operator+=(Timestamp &a, double b);
|
||||
|
||||
private:
|
||||
double at_{0};
|
||||
|
@ -122,6 +123,11 @@ inline bool operator<(const Timestamp &a, const Timestamp &b) {
|
|||
return a.at() < b.at();
|
||||
}
|
||||
|
||||
inline Timestamp &operator+=(Timestamp &a, double b) {
|
||||
a.at_ += b;
|
||||
return a;
|
||||
}
|
||||
|
||||
template <class StorerT>
|
||||
void store(const Timestamp ×tamp, StorerT &storer) {
|
||||
storer.store_binary(timestamp.at() - Time::now() + Clocks::system());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue