aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_basic
diff options
context:
space:
mode:
Diffstat (limited to 'src/cryptonote_basic')
-rw-r--r--src/cryptonote_basic/account.cpp6
-rw-r--r--src/cryptonote_basic/cryptonote_format_utils.cpp2
-rw-r--r--src/cryptonote_basic/verification_context.h8
3 files changed, 8 insertions, 8 deletions
diff --git a/src/cryptonote_basic/account.cpp b/src/cryptonote_basic/account.cpp
index a9aec163b..02eca289e 100644
--- a/src/cryptonote_basic/account.cpp
+++ b/src/cryptonote_basic/account.cpp
@@ -40,13 +40,11 @@ extern "C"
}
#include "cryptonote_basic_impl.h"
#include "cryptonote_format_utils.h"
+#include "cryptonote_config.h"
#undef MONERO_DEFAULT_LOG_CATEGORY
#define MONERO_DEFAULT_LOG_CATEGORY "account"
-#define KEYS_ENCRYPTION_SALT 'k'
-
-
using namespace std;
DISABLE_VS_WARNINGS(4244 4345)
@@ -69,7 +67,7 @@ DISABLE_VS_WARNINGS(4244 4345)
static_assert(sizeof(base_key) == sizeof(crypto::hash), "chacha key and hash should be the same size");
epee::mlocked<tools::scrubbed_arr<char, sizeof(base_key)+1>> data;
memcpy(data.data(), &base_key, sizeof(base_key));
- data[sizeof(base_key)] = KEYS_ENCRYPTION_SALT;
+ data[sizeof(base_key)] = config::HASH_KEY_MEMORY;
crypto::generate_chacha_key(data.data(), sizeof(data), key, 1);
}
//-----------------------------------------------------------------
diff --git a/src/cryptonote_basic/cryptonote_format_utils.cpp b/src/cryptonote_basic/cryptonote_format_utils.cpp
index f0b395f43..b3400abc7 100644
--- a/src/cryptonote_basic/cryptonote_format_utils.cpp
+++ b/src/cryptonote_basic/cryptonote_format_utils.cpp
@@ -44,8 +44,6 @@ using namespace epee;
#undef MONERO_DEFAULT_LOG_CATEGORY
#define MONERO_DEFAULT_LOG_CATEGORY "cn"
-#define ENCRYPTED_PAYMENT_ID_TAIL 0x8d
-
// #define ENABLE_HASH_CASH_INTEGRITY_CHECK
using namespace crypto;
diff --git a/src/cryptonote_basic/verification_context.h b/src/cryptonote_basic/verification_context.h
index f5f663464..ec5f604a5 100644
--- a/src/cryptonote_basic/verification_context.h
+++ b/src/cryptonote_basic/verification_context.h
@@ -29,6 +29,9 @@
// Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers
#pragma once
+
+#include "cryptonote_protocol/enums.h"
+
namespace cryptonote
{
/************************************************************************/
@@ -36,7 +39,9 @@ namespace cryptonote
/************************************************************************/
struct tx_verification_context
{
- bool m_should_be_relayed;
+ static_assert(unsigned(relay_method::none) == 0, "default m_relay initialization is not to relay_method::none");
+
+ relay_method m_relay; // gives indication on how tx should be relayed (if at all)
bool m_verifivation_failed; //bad tx, should drop connection
bool m_verifivation_impossible; //the transaction is related with an alternative blockchain
bool m_added_to_pool;
@@ -47,7 +52,6 @@ namespace cryptonote
bool m_too_big;
bool m_overspend;
bool m_fee_too_low;
- bool m_not_rct;
bool m_too_few_outputs;
};