aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2015-12-25 21:56:37 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2015-12-25 21:56:37 +0000
commit5eef64578ba1e19c9a6045a25369db19d4136e75 (patch)
tree20407313f0d4c0ab0dcac8fb427337769abd0f2a /src/cryptonote_core
parentMerge pull request #560 (diff)
downloadmonero-5eef64578ba1e19c9a6045a25369db19d4136e75.tar.xz
db: throw when given a non txout_to_key output to add
The check was explicit in the original version, so it seems safer to make it explicit here, especially as it is now done implicitely in a different place, away from the original check.
Diffstat (limited to 'src/cryptonote_core')
-rw-r--r--src/cryptonote_core/blockchain.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp
index badccd06f..b83a5fd0e 100644
--- a/src/cryptonote_core/blockchain.cpp
+++ b/src/cryptonote_core/blockchain.cpp
@@ -2246,6 +2246,11 @@ bool Blockchain::check_tx_input(const txin_to_key& txin, const crypto::hash& tx_
return false;
}
+ // The original code includes a check for the output corresponding to this input
+ // to be a txout_to_key. This is removed, as the database does not store this info,
+ // but only txout_to_key outputs are stored in the DB in the first place, done in
+ // Blockchain*::add_output
+
m_output_keys.push_back(pubkey);
return true;
}