aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/blockchain.cpp
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2015-12-25 22:12:52 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2015-12-25 22:12:52 +0000
commita9ff11c8167ac52a4f120d02edf45ea0feac411c (patch)
tree6890dd074050f97f3bd5a97acb349f5763e2237a /src/cryptonote_core/blockchain.cpp
parentblockchain: reinstate double spending checks in check_tx_inputs (diff)
downloadmonero-a9ff11c8167ac52a4f120d02edf45ea0feac411c.tar.xz
blockchain: fix an off by one error in unlocked time check
Diffstat (limited to 'src/cryptonote_core/blockchain.cpp')
-rw-r--r--src/cryptonote_core/blockchain.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp
index e3ce66073..03bf1df61 100644
--- a/src/cryptonote_core/blockchain.cpp
+++ b/src/cryptonote_core/blockchain.cpp
@@ -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()
// 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;
else
return false;