fix build error 1
This commit is contained in:
@@ -186,8 +186,8 @@ static FORCE_INLINE uint64_t rotr64(const uint64_t w, const unsigned c) {
|
||||
|
||||
/// END: blake2-impl.h
|
||||
|
||||
void clear_internal_memory(void *mem, const size_t length) {
|
||||
memwipe(mem, length);
|
||||
static void clear_internal_memory(void *mem, const size_t length) {
|
||||
memwipe(mem, length);
|
||||
}
|
||||
|
||||
/// BEGIN: blake2b.c
|
||||
@@ -560,4 +560,4 @@ fail:
|
||||
}
|
||||
/* Argon2 Team - End Code */
|
||||
|
||||
/// END: blake2b.c
|
||||
/// END: blake2b.c
|
||||
|
||||
@@ -70,7 +70,7 @@ static constexpr uint8_t PROTOCOL_TX_MIN_VERSION = 2;
|
||||
static constexpr uint8_t PROTOCOL_TX_VERSION = 4;
|
||||
static constexpr uint8_t PROTOCOL_TX_TYPE = 2;
|
||||
static constexpr uint8_t PROTOCOL_RCT_TYPE = 0;
|
||||
static constexpr uint8_t MINER_TX_TYPE = 1;
|
||||
[[maybe_unused]] static constexpr uint8_t MINER_TX_TYPE = 1;
|
||||
|
||||
// DEBUG helper: derive expected Ko for a given wallet and enote data
|
||||
static bool debug_derive_wallet_match(const hash& spend_pub, const hash& view_pub, const salvium_carrot::CoinbaseEnote& e)
|
||||
|
||||
@@ -45,12 +45,12 @@ static const mx25519_impl* get_mx_impl()
|
||||
}
|
||||
|
||||
// Domain separators (copied from Salvium carrot_core/config.h)
|
||||
static constexpr unsigned char CARROT_DOMAIN_SEP_AMOUNT_BLINDING_FACTOR[] = "Carrot commitment mask";
|
||||
[[maybe_unused]] static constexpr unsigned char CARROT_DOMAIN_SEP_AMOUNT_BLINDING_FACTOR[] = "Carrot commitment mask";
|
||||
static constexpr unsigned char CARROT_DOMAIN_SEP_ONETIME_EXTENSION_G[] = "Carrot key extension G";
|
||||
static constexpr unsigned char CARROT_DOMAIN_SEP_ONETIME_EXTENSION_T[] = "Carrot key extension T";
|
||||
static constexpr unsigned char CARROT_DOMAIN_SEP_ENCRYPTION_MASK_ANCHOR[] = "Carrot encryption mask anchor";
|
||||
static constexpr unsigned char CARROT_DOMAIN_SEP_ENCRYPTION_MASK_AMOUNT[] = "Carrot encryption mask a";
|
||||
static constexpr unsigned char CARROT_DOMAIN_SEP_EPHEMERAL_PRIVKEY[] = "Carrot sending key normal";
|
||||
[[maybe_unused]] static constexpr unsigned char CARROT_DOMAIN_SEP_ENCRYPTION_MASK_AMOUNT[] = "Carrot encryption mask a";
|
||||
[[maybe_unused]] static constexpr unsigned char CARROT_DOMAIN_SEP_EPHEMERAL_PRIVKEY[] = "Carrot sending key normal";
|
||||
static constexpr unsigned char CARROT_DOMAIN_SEP_VIEW_TAG[] = "Carrot view tag";
|
||||
static constexpr unsigned char CARROT_DOMAIN_SEP_SENDER_RECEIVER_SECRET[] = "Carrot sender-receiver secret";
|
||||
static constexpr unsigned char CARROT_DOMAIN_SEP_INPUT_CONTEXT_COINBASE = 'C';
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "keccak.h"
|
||||
#include "crypto.h"
|
||||
#include "salvium_carrot.h"
|
||||
#include <array>
|
||||
#include <ios>
|
||||
#include <inttypes.h>
|
||||
|
||||
@@ -49,13 +50,13 @@ constexpr int block_sizes_lookup[11] = { 0, -1, 1, 2, -1, 3, 4, 5, -1, 6, 7 };
|
||||
constexpr char alphabet[] = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";
|
||||
constexpr size_t alphabet_size = sizeof(alphabet) - 1;
|
||||
|
||||
constexpr std::array<size_t, 9> encoded_block_sizes{ 0, 2, 3, 5, 6, 7, 9, 10, 11 };
|
||||
constexpr size_t full_block_size = encoded_block_sizes.size() - 1;
|
||||
constexpr size_t full_encoded_block_size = encoded_block_sizes[full_block_size];
|
||||
|
||||
// Salvium-compatible base58 decoder (adapted from src/common/base58.cpp)
|
||||
static bool b58_decode(const std::string& in, std::string& out)
|
||||
{
|
||||
static const size_t encoded_block_sizes[] = { 0, 2, 3, 5, 6, 7, 9, 10, 11 };
|
||||
static const size_t full_block_size = sizeof(encoded_block_sizes) / sizeof(encoded_block_sizes[0]) - 1;
|
||||
static const size_t full_encoded_block_size = encoded_block_sizes[full_block_size];
|
||||
|
||||
constexpr size_t alphabet_size_local = alphabet_size;
|
||||
|
||||
static int8_t reverse_alphabet[256] = {};
|
||||
|
||||
Reference in New Issue
Block a user