1
0
Fork 0
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:
EmelyanenkoK 2023-12-06 19:34:01 +03:00 committed by GitHub
parent 51baec48a0
commit 7fcf267717
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 105 additions and 25 deletions

View file

@ -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 &timestamp, StorerT &storer) {
storer.store_binary(timestamp.at() - Time::now() + Clocks::system());