|
|
|
@ -11516,6 +11516,9 @@ void wallet2::check_tx_key_helper(const cryptonote::transaction &tx, const crypt
|
|
|
|
|
|
|
|
|
|
void wallet2::check_tx_key_helper(const crypto::hash &txid, const crypto::key_derivation &derivation, const std::vector<crypto::key_derivation> &additional_derivations, const cryptonote::account_public_address &address, uint64_t &received, bool &in_pool, uint64_t &confirmations)
|
|
|
|
|
{
|
|
|
|
|
uint32_t rpc_version;
|
|
|
|
|
THROW_WALLET_EXCEPTION_IF(!check_connection(&rpc_version), error::wallet_internal_error, "Failed to connect to daemon: " + get_daemon_address());
|
|
|
|
|
|
|
|
|
|
COMMAND_RPC_GET_TRANSACTIONS::request req;
|
|
|
|
|
COMMAND_RPC_GET_TRANSACTIONS::response res;
|
|
|
|
|
req.txs_hashes.push_back(epee::string_tools::pod_to_hex(txid));
|
|
|
|
@ -11560,12 +11563,19 @@ void wallet2::check_tx_key_helper(const crypto::hash &txid, const crypto::key_de
|
|
|
|
|
in_pool = res.txs.front().in_pool;
|
|
|
|
|
confirmations = 0;
|
|
|
|
|
if (!in_pool)
|
|
|
|
|
{
|
|
|
|
|
if (rpc_version < MAKE_CORE_RPC_VERSION(3, 7))
|
|
|
|
|
{
|
|
|
|
|
std::string err;
|
|
|
|
|
uint64_t bc_height = get_daemon_blockchain_height(err);
|
|
|
|
|
if (err.empty())
|
|
|
|
|
if (err.empty() && bc_height > res.txs.front().block_height)
|
|
|
|
|
confirmations = bc_height - res.txs.front().block_height;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
confirmations = res.txs.front().confirmations;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
std::string wallet2::get_tx_proof(const crypto::hash &txid, const cryptonote::account_public_address &address, bool is_subaddress, const std::string &message)
|
|
|
|
|