mirror of
https://github.com/monero-project/monero.git
synced 2024-11-18 00:37:43 +00:00
blockchain: fix an off by one error in unlocked time check
This commit is contained in:
parent
f294be35bc
commit
a9ff11c816
1 changed files with 1 additions and 1 deletions
|
@ -2231,7 +2231,7 @@ bool Blockchain::is_tx_spendtime_unlocked(uint64_t unlock_time) const
|
||||||
{
|
{
|
||||||
// ND: Instead of calling get_current_blockchain_height(), call m_db->height()
|
// ND: Instead of calling get_current_blockchain_height(), call m_db->height()
|
||||||
// directly as get_current_blockchain_height() locks the recursive mutex.
|
// directly as get_current_blockchain_height() locks the recursive mutex.
|
||||||
if(m_db->height() + CRYPTONOTE_LOCKED_TX_ALLOWED_DELTA_BLOCKS >= unlock_time)
|
if(m_db->height()-1 + CRYPTONOTE_LOCKED_TX_ALLOWED_DELTA_BLOCKS >= unlock_time)
|
||||||
return true;
|
return true;
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in a new issue