Import transaction

This commit is contained in:
thotbot
2021-07-03 23:05:40 +02:00
committed by wowario
parent 3ea6587022
commit 4edba5301a
5 changed files with 70 additions and 0 deletions

View File

@@ -1348,6 +1348,22 @@ bool WalletImpl::importOutputs(const string &filename)
return true;
}
bool WalletImpl::importTransaction(const std::string &txid, std::vector<uint64_t> &o_indices, uint64_t height, uint8_t block_version, uint64_t ts, bool miner_tx, bool pool, bool double_spend_seen)
{
try
{
m_wallet->import_tx(txid, o_indices, height, block_version, ts, miner_tx, pool, double_spend_seen);
}
catch (const std::exception &e)
{
LOG_ERROR("Failed to import transaction: " << e.what());
setStatusError(string(tr("Failed to import transaction: ")) + e.what());
return false;
}
return true;
}
void WalletImpl::addSubaddressAccount(const std::string& label)
{
m_wallet->add_subaddress_account(label);