mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
minor improvements and bugfixes
This commit is contained in:
parent
eecf05ca59
commit
040df63c98
24 changed files with 665 additions and 344 deletions
|
@ -678,6 +678,29 @@ td::Status CreateProposalVoteQuery::receive(td::BufferSlice data) {
|
|||
return td::Status::OK();
|
||||
}
|
||||
|
||||
td::Status CreateComplaintVoteQuery::run() {
|
||||
TRY_RESULT_ASSIGN(election_id_, tokenizer_.get_token<td::uint32>());
|
||||
TRY_RESULT_ASSIGN(data_, tokenizer_.get_token<std::string>());
|
||||
TRY_RESULT_ASSIGN(fname_, tokenizer_.get_token<std::string>());
|
||||
TRY_STATUS(tokenizer_.check_endl());
|
||||
return td::Status::OK();
|
||||
}
|
||||
|
||||
td::Status CreateComplaintVoteQuery::send() {
|
||||
auto b = ton::create_serialize_tl_object<ton::ton_api::engine_validator_createComplaintVote>(election_id_,
|
||||
td::BufferSlice(data_));
|
||||
td::actor::send_closure(console_, &ValidatorEngineConsole::envelope_send_query, std::move(b), create_promise());
|
||||
return td::Status::OK();
|
||||
}
|
||||
|
||||
td::Status CreateComplaintVoteQuery::receive(td::BufferSlice data) {
|
||||
TRY_RESULT_PREFIX(f, ton::fetch_tl_object<ton::ton_api::engine_validator_proposalVote>(data.as_slice(), true),
|
||||
"received incorrect answer: ");
|
||||
td::TerminalIO::out() << "success: permkey=" << f->perm_key_.to_hex() << "\n";
|
||||
TRY_STATUS(td::write_file(fname_, f->to_send_.as_slice()));
|
||||
return td::Status::OK();
|
||||
}
|
||||
|
||||
td::Status CheckDhtServersQuery::run() {
|
||||
TRY_RESULT_ASSIGN(id_, tokenizer_.get_token<ton::PublicKeyHash>());
|
||||
return td::Status::OK();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue