mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
Merge branch 'testnet' into block-generation
This commit is contained in:
commit
a2eb3f3631
45 changed files with 1101 additions and 202 deletions
|
@ -47,11 +47,9 @@ class WaitBlockState : public td::actor::Actor {
|
|||
void force_read_from_db();
|
||||
|
||||
void start_up() override;
|
||||
void got_block_handle(BlockHandle handle);
|
||||
void start();
|
||||
void got_state_from_db(td::Ref<ShardState> data);
|
||||
void got_state_from_static_file(td::Ref<ShardState> state, td::BufferSlice data);
|
||||
void failed_to_get_state_from_db(td::Status reason);
|
||||
void got_prev_state(td::Ref<ShardState> state);
|
||||
void failed_to_get_prev_state(td::Status reason);
|
||||
void got_block_data(td::Ref<BlockData> data);
|
||||
|
@ -70,6 +68,22 @@ class WaitBlockState : public td::actor::Actor {
|
|||
priority_ = priority;
|
||||
}
|
||||
|
||||
// These two methods can be called from ValidatorManagerImpl::written_handle
|
||||
void after_get_proof_link() {
|
||||
if (!waiting_proof_link_) {
|
||||
return;
|
||||
}
|
||||
waiting_proof_link_ = false;
|
||||
start();
|
||||
}
|
||||
void after_get_proof() {
|
||||
if (!waiting_proof_) {
|
||||
return;
|
||||
}
|
||||
waiting_proof_ = false;
|
||||
start();
|
||||
}
|
||||
|
||||
private:
|
||||
BlockHandle handle_;
|
||||
|
||||
|
@ -84,6 +98,8 @@ class WaitBlockState : public td::actor::Actor {
|
|||
td::Ref<BlockData> block_;
|
||||
|
||||
bool reading_from_db_ = false;
|
||||
bool waiting_proof_link_ = false;
|
||||
bool waiting_proof_ = false;
|
||||
td::Timestamp next_static_file_attempt_;
|
||||
|
||||
td::PerfWarningTimer perf_timer_{"waitstate", 1.0};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue