mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
Allow unlimited catchain.getBlock requests (#1132)
This commit is contained in:
parent
e9bd482382
commit
48d94d500a
2 changed files with 3 additions and 7 deletions
|
@ -697,12 +697,8 @@ void CatChainReceiverImpl::process_query(adnl::AdnlNodeIdShort src, ton_api::cat
|
|||
} else {
|
||||
CatChainReceiverSource *S = get_source_by_adnl_id(src);
|
||||
CHECK(S != nullptr);
|
||||
if (S->allow_send_block(it->second->get_hash())) {
|
||||
promise.set_value(serialize_tl_object(create_tl_object<ton_api::catchain_blockResult>(it->second->export_tl()),
|
||||
true, it->second->get_payload().as_slice()));
|
||||
} else {
|
||||
promise.set_error(td::Status::Error("block was requested too many times"));
|
||||
}
|
||||
promise.set_value(serialize_tl_object(create_tl_object<ton_api::catchain_blockResult>(it->second->export_tl()),
|
||||
true, it->second->get_payload().as_slice()));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue