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

@ -44,9 +44,6 @@ class CatChainReceiver : public CatChainReceiverInterface {
CatChainSessionId instance_;
PublicKeyHash local_id_;
};
td::uint32 get_max_neighbours() const {
return 5;
}
virtual PrintId print_id() const = 0;
virtual CatChainReceivedBlock *create_block(tl_object_ptr<ton_api::catchain_block> block,
td::SharedSlice payload) = 0;
@ -64,12 +61,15 @@ class CatChainReceiver : public CatChainReceiverInterface {
virtual const CatChainOptions &opts() const = 0;
virtual td::Status validate_block_sync(tl_object_ptr<ton_api::catchain_block_dep> &dep) = 0;
virtual td::Status validate_block_sync(tl_object_ptr<ton_api::catchain_block> &block, td::Slice payload) = 0;
virtual td::Status validate_block_sync(const tl_object_ptr<ton_api::catchain_block_dep> &dep) const = 0;
virtual td::Status validate_block_sync(const tl_object_ptr<ton_api::catchain_block> &block,
const td::Slice &payload) const = 0;
virtual ~CatChainReceiver() = default;
};
td::uint64 get_max_block_height(const CatChainOptions& opts, size_t sources_cnt);
} // namespace catchain
} // namespace ton