1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-03-09 15:40:10 +00:00

Update catchain (#432)

* Update catchain

* Update ton_api.tlo
This commit is contained in:
SpyCheese 2022-08-08 09:31:36 +03:00 committed by GitHub
parent 5101b404a4
commit 8d7f1bba73
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
27 changed files with 617 additions and 477 deletions

View file

@ -23,6 +23,7 @@
#include "catchain-receiver-source.h"
#include "catchain-receiver.h"
#include "catchain-received-block.h"
#include <queue>
namespace ton {
@ -82,7 +83,7 @@ class CatChainReceiverSourceImpl : public CatChainReceiverSource {
if (blamed()) {
return true;
}
if (!blocks_.size()) {
if (blocks_.empty()) {
return false;
}
CHECK(blocks_.rbegin()->second->get_height() >= received_height_);
@ -93,9 +94,8 @@ class CatChainReceiverSourceImpl : public CatChainReceiverSource {
}
CatChainReceivedBlock *get_block(CatChainBlockHeight height) const override;
td::Status validate_dep_sync(tl_object_ptr<ton_api::catchain_block_dep> &dep) override;
void on_new_block(CatChainReceivedBlock *block) override;
void on_found_fork_proof(td::Slice proof) override;
void on_found_fork_proof(const td::Slice &proof) override;
bool fork_is_found() const override {
return !fork_proof_.empty();
}
@ -103,7 +103,7 @@ class CatChainReceiverSourceImpl : public CatChainReceiverSource {
if (!fork_proof_.empty()) {
return fork_proof_.clone_as_buffer_slice();
} else {
return td::BufferSlice();
return {};
}
}