mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
Exporting and importing candidates using validator-engine-console; lite mode for validator group
This commit is contained in:
parent
625516c568
commit
415ace3da9
16 changed files with 410 additions and 5 deletions
|
@ -1092,6 +1092,74 @@ class GetValidatorSessionsInfoQuery : public Query {
|
|||
std::string name() const override {
|
||||
return get_name();
|
||||
}
|
||||
};
|
||||
|
||||
class GenerateBlockCandidateQuery : public Query {
|
||||
public:
|
||||
GenerateBlockCandidateQuery(td::actor::ActorId<ValidatorEngineConsole> console, Tokenizer tokenizer)
|
||||
: Query(console, std::move(tokenizer)) {
|
||||
}
|
||||
td::Status run() override;
|
||||
td::Status send() override;
|
||||
td::Status receive(td::BufferSlice data) override;
|
||||
static std::string get_name() {
|
||||
return "genblock";
|
||||
}
|
||||
static std::string get_help() {
|
||||
return "genblock <wc> <shard> <seqno> <file>\t"
|
||||
"generate a block candidate for a given shard (seqno mush match the next seqno for the shard), "
|
||||
"candidate is saved to <file>";
|
||||
}
|
||||
std::string name() const override {
|
||||
return get_name();
|
||||
}
|
||||
|
||||
private:
|
||||
td::int32 wc_;
|
||||
td::int64 shard_;
|
||||
td::int32 seqno_;
|
||||
std::string file_;
|
||||
};
|
||||
|
||||
class GetRequiredBlockCandidatesQuery : public Query {
|
||||
public:
|
||||
GetRequiredBlockCandidatesQuery(td::actor::ActorId<ValidatorEngineConsole> console, Tokenizer tokenizer)
|
||||
: Query(console, std::move(tokenizer)) {
|
||||
}
|
||||
td::Status run() override;
|
||||
td::Status send() override;
|
||||
td::Status receive(td::BufferSlice data) override;
|
||||
static std::string get_name() {
|
||||
return "getrequiredblockcandidates";
|
||||
}
|
||||
static std::string get_help() {
|
||||
return "getrequiredblockcandidates\t"
|
||||
"get a list of block candidates that the validator is currently waiting for";
|
||||
}
|
||||
std::string name() const override {
|
||||
return get_name();
|
||||
}
|
||||
};
|
||||
|
||||
class ImportBlockCandidateQuery : public Query {
|
||||
public:
|
||||
ImportBlockCandidateQuery(td::actor::ActorId<ValidatorEngineConsole> console, Tokenizer tokenizer)
|
||||
: Query(console, std::move(tokenizer)) {
|
||||
}
|
||||
td::Status run() override;
|
||||
td::Status send() override;
|
||||
td::Status receive(td::BufferSlice data) override;
|
||||
static std::string get_name() {
|
||||
return "importblockcandidate";
|
||||
}
|
||||
static std::string get_help() {
|
||||
return "importblockcandidate <file>\t"
|
||||
"load a block candidate from a given file";
|
||||
}
|
||||
std::string name() const override {
|
||||
return get_name();
|
||||
}
|
||||
|
||||
private:
|
||||
std::string file_;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue