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

added support for config change proposals

- added some fift scripts for the config change proposal voting
- added validator-engine-console support for the config change proposal voting
- additional sanity checks in catchain
- unsafe slow catchain resync method
This commit is contained in:
ton 2020-03-30 17:20:45 +04:00
parent a31f8d4424
commit 4dd5eea11f
35 changed files with 753 additions and 144 deletions

View file

@ -134,6 +134,9 @@ class CatChainReceiverImpl : public CatChainReceiver {
void block_written_to_db(CatChainBlockHash hash);
bool unsafe_start_up_check_completed();
void written_unsafe_root_block(CatChainReceivedBlock *block);
void destroy() override;
CatChainReceivedBlock *get_block(CatChainBlockHash hash) const;
@ -141,7 +144,7 @@ class CatChainReceiverImpl : public CatChainReceiver {
CatChainReceiverImpl(std::unique_ptr<Callback> callback, CatChainOptions opts,
td::actor::ActorId<keyring::Keyring> keyring, td::actor::ActorId<adnl::Adnl> adnl,
td::actor::ActorId<overlay::Overlays>, std::vector<CatChainNode> ids, PublicKeyHash local_id,
CatChainBlockHash unique_hash, std::string db_root);
CatChainBlockHash unique_hash, std::string db_root, bool allow_unsafe_self_blocks_resync);
private:
std::unique_ptr<overlay::Overlays::Callback> make_callback() {
@ -222,6 +225,10 @@ class CatChainReceiverImpl : public CatChainReceiver {
DbType db_;
bool intentional_fork_ = false;
td::Timestamp initial_sync_complete_at_{td::Timestamp::never()};
bool allow_unsafe_self_blocks_resync_{false};
bool unsafe_root_block_writing_{false};
bool started_{false};
std::list<CatChainReceivedBlock *> to_run_;
};