mirror of
https://github.com/monero-project/monero.git
synced 2024-10-01 11:49:47 -04:00
Merge pull request #2247
a839a6fa
Wallet API: add tx unlock time (Jaquee)
This commit is contained in:
commit
bfd2532ea5
@ -132,6 +132,7 @@ void TransactionHistoryImpl::refresh()
|
|||||||
ti->m_blockheight = pd.m_block_height;
|
ti->m_blockheight = pd.m_block_height;
|
||||||
ti->m_timestamp = pd.m_timestamp;
|
ti->m_timestamp = pd.m_timestamp;
|
||||||
ti->m_confirmations = wallet_height - pd.m_block_height;
|
ti->m_confirmations = wallet_height - pd.m_block_height;
|
||||||
|
ti->m_unlock_time = pd.m_unlock_time;
|
||||||
m_history.push_back(ti);
|
m_history.push_back(ti);
|
||||||
|
|
||||||
/* output.insert(std::make_pair(pd.m_block_height, std::make_pair(true, (boost::format("%20.20s %s %s %s")
|
/* output.insert(std::make_pair(pd.m_block_height, std::make_pair(true, (boost::format("%20.20s %s %s %s")
|
||||||
|
@ -50,6 +50,7 @@ TransactionInfoImpl::TransactionInfoImpl()
|
|||||||
, m_blockheight(0)
|
, m_blockheight(0)
|
||||||
, m_timestamp(0)
|
, m_timestamp(0)
|
||||||
, m_confirmations(0)
|
, m_confirmations(0)
|
||||||
|
, m_unlock_time(0)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -115,6 +116,11 @@ uint64_t TransactionInfoImpl::confirmations() const
|
|||||||
return m_confirmations;
|
return m_confirmations;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint64_t TransactionInfoImpl::unlockTime() const
|
||||||
|
{
|
||||||
|
return m_unlock_time;
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
namespace Bitmonero = Monero;
|
namespace Bitmonero = Monero;
|
||||||
|
@ -56,6 +56,7 @@ public:
|
|||||||
virtual std::string paymentId() const;
|
virtual std::string paymentId() const;
|
||||||
virtual const std::vector<Transfer> &transfers() const;
|
virtual const std::vector<Transfer> &transfers() const;
|
||||||
virtual uint64_t confirmations() const;
|
virtual uint64_t confirmations() const;
|
||||||
|
virtual uint64_t unlockTime() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int m_direction;
|
int m_direction;
|
||||||
@ -69,6 +70,7 @@ private:
|
|||||||
std::string m_paymentid;
|
std::string m_paymentid;
|
||||||
std::vector<Transfer> m_transfers;
|
std::vector<Transfer> m_transfers;
|
||||||
uint64_t m_confirmations;
|
uint64_t m_confirmations;
|
||||||
|
uint64_t m_unlock_time;
|
||||||
|
|
||||||
friend class TransactionHistoryImpl;
|
friend class TransactionHistoryImpl;
|
||||||
|
|
||||||
|
@ -156,6 +156,7 @@ struct TransactionInfo
|
|||||||
virtual uint64_t fee() const = 0;
|
virtual uint64_t fee() const = 0;
|
||||||
virtual uint64_t blockHeight() const = 0;
|
virtual uint64_t blockHeight() const = 0;
|
||||||
virtual uint64_t confirmations() const = 0;
|
virtual uint64_t confirmations() const = 0;
|
||||||
|
virtual uint64_t unlockTime() const = 0;
|
||||||
//! transaction_id
|
//! transaction_id
|
||||||
virtual std::string hash() const = 0;
|
virtual std::string hash() const = 0;
|
||||||
virtual std::time_t timestamp() const = 0;
|
virtual std::time_t timestamp() const = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user