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

tonNode.getOutMsgQueueProof query in public shard overlays (#1413)

* tonNode.getOutMsgQueueProof query in public shard overlays

* Allow responding to getOutMsgQueueProof requests one at a time only
This commit is contained in:
SpyCheese 2024-12-04 14:38:57 +03:00 committed by GitHub
parent 9ae88d87e3
commit 7bc50e63d7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
37 changed files with 729 additions and 51 deletions

View file

@ -144,7 +144,7 @@ void DownloadBlockNew::got_block_handle(BlockHandle handle) {
return;
}
auto P = td::PromiseCreator::lambda([SelfId = actor_id(this)](td::Result<std::unique_ptr<DownloadToken>> R) {
auto P = td::PromiseCreator::lambda([SelfId = actor_id(this)](td::Result<std::unique_ptr<ActionToken>> R) {
if (R.is_error()) {
td::actor::send_closure(SelfId, &DownloadBlockNew::abort_query,
R.move_as_error_prefix("failed to get download token: "));
@ -156,7 +156,7 @@ void DownloadBlockNew::got_block_handle(BlockHandle handle) {
std::move(P));
}
void DownloadBlockNew::got_download_token(std::unique_ptr<DownloadToken> token) {
void DownloadBlockNew::got_download_token(std::unique_ptr<ActionToken> token) {
token_ = std::move(token);
if (download_from_.is_zero() && client_.empty()) {

View file

@ -49,7 +49,7 @@ class DownloadBlockNew : public td::actor::Actor {
void start_up() override;
void got_block_handle(BlockHandle handle);
void got_download_token(std::unique_ptr<DownloadToken> token);
void got_download_token(std::unique_ptr<ActionToken> token);
void got_node_to_download(adnl::AdnlNodeIdShort node);
void got_data(td::BufferSlice data);
void got_data_from_db(td::BufferSlice data);
@ -79,7 +79,7 @@ class DownloadBlockNew : public td::actor::Actor {
bool allow_partial_proof_ = false;
std::unique_ptr<DownloadToken> token_;
std::unique_ptr<ActionToken> token_;
};
} // namespace fullnode

View file

@ -128,7 +128,7 @@ void DownloadBlock::got_block_handle(BlockHandle handle) {
return;
}
auto P = td::PromiseCreator::lambda([SelfId = actor_id(this)](td::Result<std::unique_ptr<DownloadToken>> R) {
auto P = td::PromiseCreator::lambda([SelfId = actor_id(this)](td::Result<std::unique_ptr<ActionToken>> R) {
if (R.is_error()) {
td::actor::send_closure(SelfId, &DownloadBlock::abort_query,
R.move_as_error_prefix("failed to get download token: "));
@ -140,7 +140,7 @@ void DownloadBlock::got_block_handle(BlockHandle handle) {
std::move(P));
}
void DownloadBlock::got_download_token(std::unique_ptr<DownloadToken> token) {
void DownloadBlock::got_download_token(std::unique_ptr<ActionToken> token) {
token_ = std::move(token);
if (download_from_.is_zero() && !short_ && client_.empty()) {

View file

@ -49,7 +49,7 @@ class DownloadBlock : public td::actor::Actor {
void start_up() override;
void got_block_handle(BlockHandle handle);
void got_download_token(std::unique_ptr<DownloadToken> token);
void got_download_token(std::unique_ptr<ActionToken> token);
void got_node_to_download(adnl::AdnlNodeIdShort node);
void got_block_proof_description(td::BufferSlice proof_description);
void got_block_proof(td::BufferSlice data);
@ -86,7 +86,7 @@ class DownloadBlock : public td::actor::Actor {
bool allow_partial_proof_ = false;
std::unique_ptr<DownloadToken> token_;
std::unique_ptr<ActionToken> token_;
};
} // namespace fullnode

View file

@ -107,7 +107,7 @@ void DownloadProof::start_up() {
}
void DownloadProof::checked_db() {
auto P = td::PromiseCreator::lambda([SelfId = actor_id(this)](td::Result<std::unique_ptr<DownloadToken>> R) {
auto P = td::PromiseCreator::lambda([SelfId = actor_id(this)](td::Result<std::unique_ptr<ActionToken>> R) {
if (R.is_error()) {
td::actor::send_closure(SelfId, &DownloadProof::abort_query,
R.move_as_error_prefix("failed to get download token: "));
@ -119,7 +119,7 @@ void DownloadProof::checked_db() {
std::move(P));
}
void DownloadProof::got_download_token(std::unique_ptr<DownloadToken> token) {
void DownloadProof::got_download_token(std::unique_ptr<ActionToken> token) {
token_ = std::move(token);
if (download_from_.is_zero() && client_.empty()) {

View file

@ -45,7 +45,7 @@ class DownloadProof : public td::actor::Actor {
void start_up() override;
void checked_db();
void got_download_token(std::unique_ptr<DownloadToken> token);
void got_download_token(std::unique_ptr<ActionToken> token);
void got_node_to_download(adnl::AdnlNodeIdShort node);
void got_block_proof_description(td::BufferSlice proof_description);
void got_block_proof(td::BufferSlice data);
@ -72,7 +72,7 @@ class DownloadProof : public td::actor::Actor {
td::BufferSlice data_;
std::unique_ptr<DownloadToken> token_;
std::unique_ptr<ActionToken> token_;
};
} // namespace fullnode

View file

@ -84,7 +84,7 @@ void GetNextKeyBlocks::finish_query() {
void GetNextKeyBlocks::start_up() {
alarm_timestamp() = timeout_;
auto P = td::PromiseCreator::lambda([SelfId = actor_id(this)](td::Result<std::unique_ptr<DownloadToken>> R) {
auto P = td::PromiseCreator::lambda([SelfId = actor_id(this)](td::Result<std::unique_ptr<ActionToken>> R) {
if (R.is_error()) {
td::actor::send_closure(SelfId, &GetNextKeyBlocks::abort_query,
R.move_as_error_prefix("failed to get download token: "));
@ -96,7 +96,7 @@ void GetNextKeyBlocks::start_up() {
std::move(P));
}
void GetNextKeyBlocks::got_download_token(std::unique_ptr<DownloadToken> token) {
void GetNextKeyBlocks::got_download_token(std::unique_ptr<ActionToken> token) {
token_ = std::move(token);
if (download_from_.is_zero() && client_.empty()) {

View file

@ -44,7 +44,7 @@ class GetNextKeyBlocks : public td::actor::Actor {
void finish_query();
void start_up() override;
void got_download_token(std::unique_ptr<DownloadToken> token);
void got_download_token(std::unique_ptr<ActionToken> token);
void got_node_to_download(adnl::AdnlNodeIdShort node);
void send_request();
void got_result(td::BufferSlice res);
@ -75,7 +75,7 @@ class GetNextKeyBlocks : public td::actor::Actor {
std::vector<BlockIdExt> pending_;
std::vector<BlockIdExt> res_;
std::unique_ptr<DownloadToken> token_;
std::unique_ptr<ActionToken> token_;
};
} // namespace fullnode