aboutsummaryrefslogtreecommitdiff
path: root/src/blockchain_db/lmdb
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-12-01 14:26:18 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-12-01 14:26:18 +0000
commit3465c4ebc7d38b9825e2bc95a9279de7f03e7594 (patch)
treec86a1fc951d850d28474d9d8310a1515383bdb6e /src/blockchain_db/lmdb
parentMerge pull request #1372 (diff)
downloadmonero-3465c4ebc7d38b9825e2bc95a9279de7f03e7594.tar.xz
db_lmdb: set same packing format for output_data_t and pre_rct_output_data_t
For safety, though it seems to have been the case already. Also add a comment about the necessary layout identity.
Diffstat (limited to 'src/blockchain_db/lmdb')
-rw-r--r--src/blockchain_db/lmdb/db_lmdb.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/blockchain_db/lmdb/db_lmdb.cpp b/src/blockchain_db/lmdb/db_lmdb.cpp
index b5459b56b..2281c1da0 100644
--- a/src/blockchain_db/lmdb/db_lmdb.cpp
+++ b/src/blockchain_db/lmdb/db_lmdb.cpp
@@ -51,12 +51,15 @@ using epee::string_tools::pod_to_hex;
namespace
{
+#pragma pack(push, 1)
+// This MUST be identical to output_data_t, without the extra rct data at the end
struct pre_rct_output_data_t
{
crypto::public_key pubkey; //!< the output's public key (for spend verification)
uint64_t unlock_time; //!< the output's unlock time (or height)
uint64_t height; //!< the height of the block which created the output
};
+#pragma pack(pop)
template <typename T>
inline void throw0(const T &e)