From 33257e30a3d3ae0803711b7aff34d06ed87d1bf8 Mon Sep 17 00:00:00 2001 From: Andrey Tvorozhkov Date: Mon, 30 Sep 2024 14:36:08 +0300 Subject: [PATCH] Fix query --- tvm-python/PyLiteClient.cpp | 24 ++++++++++++------------ validator-engine/ClusterSyncer.cpp | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/tvm-python/PyLiteClient.cpp b/tvm-python/PyLiteClient.cpp index 8b6e179ab..7c9f62e57 100644 --- a/tvm-python/PyLiteClient.cpp +++ b/tvm-python/PyLiteClient.cpp @@ -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(response.get()); @@ -382,7 +382,7 @@ namespace pylite { std::unique_ptr 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(response.get()); @@ -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; @@ -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); }); @@ -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; @@ -706,7 +706,7 @@ namespace pylite { std::tuple 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; @@ -762,7 +762,7 @@ namespace pylite { } std::vector> PyLiteClient::admin_getStatData() { - + scheduler_.run_in_context_external([&] { send_closure(engine, &LiteClientActorEngine::admin_GetStatData); }); @@ -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); }); @@ -842,7 +842,7 @@ namespace pylite { } std::vector PyLiteClient::get_AllShardsInfo(ton::BlockIdExt req_blkid) { - + scheduler_.run_in_context_external( [&] { send_closure(engine, &LiteClientActorEngine::get_AllShardsInfo, std::move(req_blkid)); }); @@ -882,7 +882,7 @@ namespace pylite { } PyDict PyLiteClient::get_Libraries(std::vector libs) { - + std::vector libs_bits; libs_bits.reserve(libs.size()); @@ -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); }); @@ -970,7 +970,7 @@ namespace pylite { BlockTransactionsExt PyLiteClient::get_listBlockTransactionsExt(ton::BlockIdExt blkid, int mode, int count, std::optional account, std::optional lt) { - + bool check_proof = mode & 32; bool reverse_mode = mode & 64; diff --git a/validator-engine/ClusterSyncer.cpp b/validator-engine/ClusterSyncer.cpp index 0719b38d3..ac0626739 100644 --- a/validator-engine/ClusterSyncer.cpp +++ b/validator-engine/ClusterSyncer.cpp @@ -76,7 +76,7 @@ namespace ton { P.set_result(std::move(answer)); } else { auto query = ton::create_tl_object(root_hash, 0); - auto q = ton::create_tl_object(ton::serialize_tl_object(query, true)); + auto q = ton::create_tl_object(ton::serialize_tl_object(query, true)); td::actor::send_closure( client, &ton::adnl::AdnlExtClient::send_query, "query", serialize_tl_object(std::move(q), true),