mirror of
https://github.com/monero-project/monero.git
synced 2024-12-14 20:36:31 +02:00
Merge pull request #1307
4dcb74f
wallet_api: PendingTransaction::txCount - number of split transactions (Ilya Kitaev)
This commit is contained in:
commit
06ca304b06
@ -80,8 +80,8 @@ std::vector<std::string> PendingTransactionImpl::txid() const
|
|||||||
bool PendingTransactionImpl::commit()
|
bool PendingTransactionImpl::commit()
|
||||||
{
|
{
|
||||||
|
|
||||||
LOG_PRINT_L0("m_pending_tx size: " << m_pending_tx.size());
|
LOG_PRINT_L3("m_pending_tx size: " << m_pending_tx.size());
|
||||||
assert(m_pending_tx.size() == 1);
|
|
||||||
try {
|
try {
|
||||||
while (!m_pending_tx.empty()) {
|
while (!m_pending_tx.empty()) {
|
||||||
auto & ptx = m_pending_tx.back();
|
auto & ptx = m_pending_tx.back();
|
||||||
@ -142,5 +142,10 @@ uint64_t PendingTransactionImpl::fee() const
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint64_t PendingTransactionImpl::txCount() const
|
||||||
|
{
|
||||||
|
return m_pending_tx.size();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,6 +50,7 @@ public:
|
|||||||
uint64_t dust() const;
|
uint64_t dust() const;
|
||||||
uint64_t fee() const;
|
uint64_t fee() const;
|
||||||
std::vector<std::string> txid() const;
|
std::vector<std::string> txid() const;
|
||||||
|
uint64_t txCount() const;
|
||||||
// TODO: continue with interface;
|
// TODO: continue with interface;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -66,6 +66,11 @@ struct PendingTransaction
|
|||||||
virtual uint64_t dust() const = 0;
|
virtual uint64_t dust() const = 0;
|
||||||
virtual uint64_t fee() const = 0;
|
virtual uint64_t fee() const = 0;
|
||||||
virtual std::vector<std::string> txid() const = 0;
|
virtual std::vector<std::string> txid() const = 0;
|
||||||
|
/*!
|
||||||
|
* \brief txCount - number of transactions current transaction will be splitted to
|
||||||
|
* \return
|
||||||
|
*/
|
||||||
|
virtual uint64_t txCount() const = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user