mirror of
https://github.com/monero-project/monero.git
synced 2025-08-11 09:50:12 -04:00
Merge pull request #2082
235df7f4
blockchain_db: add a txpool tx getter which returns existence (moneromooo-monero)
This commit is contained in:
commit
78f965a9e2
7 changed files with 31 additions and 5 deletions
|
@ -4005,6 +4005,11 @@ txpool_tx_meta_t Blockchain::get_txpool_tx_meta(const crypto::hash& txid) const
|
|||
return m_db->get_txpool_tx_meta(txid);
|
||||
}
|
||||
|
||||
bool Blockchain::get_txpool_tx_blob(const crypto::hash& txid, cryptonote::blobdata &bd) const
|
||||
{
|
||||
return m_db->get_txpool_tx_blob(txid, bd);
|
||||
}
|
||||
|
||||
cryptonote::blobdata Blockchain::get_txpool_tx_blob(const crypto::hash& txid) const
|
||||
{
|
||||
return m_db->get_txpool_tx_blob(txid);
|
||||
|
|
|
@ -862,6 +862,7 @@ namespace cryptonote
|
|||
void remove_txpool_tx(const crypto::hash &txid);
|
||||
uint64_t get_txpool_tx_count() const;
|
||||
txpool_tx_meta_t get_txpool_tx_meta(const crypto::hash& txid) const;
|
||||
bool get_txpool_tx_blob(const crypto::hash& txid, cryptonote::blobdata &bd) const;
|
||||
cryptonote::blobdata get_txpool_tx_blob(const crypto::hash& txid) const;
|
||||
bool for_all_txpool_txes(std::function<bool(const crypto::hash&, const txpool_tx_meta_t&, const cryptonote::blobdata*)>, bool include_blob = false) const;
|
||||
|
||||
|
|
|
@ -673,8 +673,7 @@ namespace cryptonote
|
|||
CRITICAL_REGION_LOCAL1(m_blockchain);
|
||||
try
|
||||
{
|
||||
txblob = m_blockchain.get_txpool_tx_blob(id);
|
||||
return true;
|
||||
return m_blockchain.get_txpool_tx_blob(id, txblob);
|
||||
}
|
||||
catch (const std::exception &e)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue