1
0
Fork 0
forked from lthn/blockchain
blockchain/tests/performance_tests/api_test.cpp

26 lines
892 B
C++
Raw Permalink Normal View History

2022-07-12 23:05:36 +02:00
// Copyright (c) 2012-2013 The Cryptonote developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "wallet/core_rpc_proxy.h"
#include "wallet/core_default_rpc_proxy.h"
int test_get_rand_outs()
{
currency::COMMAND_RPC_GET_RANDOM_OUTPUTS_FOR_AMOUNTS::request req = AUTO_VAL_INIT(req);
currency::COMMAND_RPC_GET_RANDOM_OUTPUTS_FOR_AMOUNTS::response rsp = AUTO_VAL_INIT(rsp);
req.use_forced_mix_outs = false;
req.decoys_count = 10 + 1;
2022-07-12 23:05:36 +02:00
for (size_t i = 0; i != 50; i++)
req.amounts.push_back(COIN);
std::shared_ptr<tools::i_core_proxy> m_core_proxy(new tools::default_http_core_proxy());
m_core_proxy->set_connection_addr("127.0.0.1:11211");
m_core_proxy->check_connection();
m_core_proxy->call_COMMAND_RPC_GET_RANDOM_OUTPUTS_FOR_AMOUNTS(req, rsp);
2022-07-12 23:05:36 +02:00
return 0;
}