Skip to content

Commit

Permalink
Fix query
Browse files Browse the repository at this point in the history
  • Loading branch information
tvorogme committed Sep 30, 2024
1 parent f77ff04 commit 33257e3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
24 changes: 12 additions & 12 deletions tvm-python/PyLiteClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ namespace pylite {
scheduler_.run_in_context_external(
[&] { send_closure(engine, &LiteClientActorEngine::get_AccountState, workchain, address_bits, blk); });


auto response = wait_response();
if (response->success) {
SuccessBufferSlice *data = dynamic_cast<SuccessBufferSlice *>(response.get());
Expand Down Expand Up @@ -382,7 +382,7 @@ namespace pylite {
std::unique_ptr<ton::lite_api::liteServer_masterchainInfoExt> PyLiteClient::get_MasterchainInfoExt() {
scheduler_.run_in_context_external(
[&] { send_closure(engine, &LiteClientActorEngine::get_MasterchainInfoExt, 0); });

auto response = wait_response();
if (response->success) {
SuccessBufferSlice *data = dynamic_cast<SuccessBufferSlice *>(response.get());
Expand Down Expand Up @@ -531,7 +531,7 @@ namespace pylite {

block::TransactionList::Info PyLiteClient::get_Transactions(int count, int workchain, std::string address_string,
unsigned long long lt, std::string hash_int_string) {


td::RefInt256 address_int = td::string_to_int256(address_string);
td::Bits256 address_bits;
Expand Down Expand Up @@ -591,7 +591,7 @@ namespace pylite {
}

TestNode::BlockHdrInfo PyLiteClient::get_BlockHeader(ton::BlockIdExt req_blkid, int mode) {


scheduler_.run_in_context_external(
[&] { send_closure(engine, &LiteClientActorEngine::get_BlockHeader, req_blkid, mode); });
Expand All @@ -607,7 +607,7 @@ namespace pylite {

PyCell PyLiteClient::get_OneTransaction(ton::BlockIdExt req_blkid, int workchain, std::string address_string,
unsigned long long trans_lt) {


td::RefInt256 address_int = td::string_to_int256(address_string);
td::Bits256 address_bits;
Expand Down Expand Up @@ -706,7 +706,7 @@ namespace pylite {

std::tuple<PubKeyHex, ShortKeyHex> PyLiteClient::admin_AddUser(std::string privkey, td::int64 valid_until,
td::int32 ratelimit) {


td::RefInt256 pubkey_int = td::string_to_int256(privkey);
td::Bits256 privkey_bits;
Expand Down Expand Up @@ -762,7 +762,7 @@ namespace pylite {
}

std::vector<std::tuple<ShortKeyHex, int, td::int64, td::int64, bool>> PyLiteClient::admin_getStatData() {


scheduler_.run_in_context_external([&] { send_closure(engine, &LiteClientActorEngine::admin_GetStatData); });

Expand Down Expand Up @@ -792,7 +792,7 @@ namespace pylite {
};

PyCell PyLiteClient::get_Block(ton::BlockIdExt req_blkid) {


scheduler_.run_in_context_external([&] { send_closure(engine, &LiteClientActorEngine::get_Block, req_blkid); });

Expand Down Expand Up @@ -842,7 +842,7 @@ namespace pylite {
}

std::vector<ton::BlockId> PyLiteClient::get_AllShardsInfo(ton::BlockIdExt req_blkid) {


scheduler_.run_in_context_external(
[&] { send_closure(engine, &LiteClientActorEngine::get_AllShardsInfo, std::move(req_blkid)); });
Expand Down Expand Up @@ -882,7 +882,7 @@ namespace pylite {
}

PyDict PyLiteClient::get_Libraries(std::vector<std::string> libs) {


std::vector<td::Bits256> libs_bits;
libs_bits.reserve(libs.size());
Expand Down Expand Up @@ -931,7 +931,7 @@ namespace pylite {
}

bool PyLiteClient::wait_connected(double wait) {


scheduler_.run_in_context_external(
[&, wait] { send_closure(engine, &LiteClientActorEngine::wait_connected, wait); });
Expand Down Expand Up @@ -970,7 +970,7 @@ namespace pylite {
BlockTransactionsExt PyLiteClient::get_listBlockTransactionsExt(ton::BlockIdExt blkid, int mode, int count,
std::optional<std::string> account,
std::optional<unsigned long long> lt) {


bool check_proof = mode & 32;
bool reverse_mode = mode & 64;
Expand Down
2 changes: 1 addition & 1 deletion validator-engine/ClusterSyncer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ namespace ton {
P.set_result(std::move(answer));
} else {
auto query = ton::create_tl_object<ton::lite_api::liteServer_checkItemPublished>(root_hash, 0);
auto q = ton::create_tl_object<ton::lite_api::liteServer_query>(ton::serialize_tl_object(query, true));
auto q = ton::create_tl_object<ton::lite_api::liteServer_adminQuery>(ton::serialize_tl_object(query, true));

td::actor::send_closure(
client, &ton::adnl::AdnlExtClient::send_query, "query", serialize_tl_object(std::move(q), true),
Expand Down

0 comments on commit 33257e3

Please sign in to comment.