unit_tests: fix ringdb unit tests

This commit is contained in:
moneromooo-monero 2019-10-04 21:11:18 +00:00
parent b60cf6a938
commit ae34e1ba1c
No known key found for this signature in database
GPG Key ID: 686F07454D6CEFC3
1 changed files with 11 additions and 5 deletions

View File

@ -65,11 +65,17 @@ static std::pair<uint64_t, uint64_t> generate_output()
}
#define KEY_1 []{ static const crypto::chacha_key KEY_1 = generate_chacha_key(); return KEY_1; }()
#define KEY_2 []{ static const crypto::chacha_key KEY_2 = generate_chacha_key(); return KEY_2; }()
#define KEY_IMAGE_1 []{ static const crypto::key_image KEY_IMAGE_1 = generate_key_image(); return KEY_IMAGE_1; }()
#define OUTPUT_1 []{ static const std::pair<uint64_t, uint64_t> OUTPUT_1 = generate_output(); return OUTPUT_1; }()
#define OUTPUT_2 []{ static const std::pair<uint64_t, uint64_t> OUTPUT_2 = generate_output(); return OUTPUT_2; }()
static crypto::chacha_key get_KEY_1() { static const crypto::chacha_key KEY_1 = generate_chacha_key(); return KEY_1; }
static crypto::chacha_key get_KEY_2() { static const crypto::chacha_key KEY_2 = generate_chacha_key(); return KEY_2; }
static crypto::key_image get_KEY_IMAGE_1() { static const crypto::key_image KEY_IMAGE_1 = generate_key_image(); return KEY_IMAGE_1; }
static std::pair<uint64_t, uint64_t> get_OUTPUT_1() { static const std::pair<uint64_t, uint64_t> OUTPUT_1 = generate_output(); return OUTPUT_1; }
static std::pair<uint64_t, uint64_t> get_OUTPUT_2() { static const std::pair<uint64_t, uint64_t> OUTPUT_2 = generate_output(); return OUTPUT_2; }
#define KEY_1 get_KEY_1()
#define KEY_2 get_KEY_2()
#define KEY_IMAGE_1 get_KEY_IMAGE_1()
#define OUTPUT_1 get_OUTPUT_1()
#define OUTPUT_2 get_OUTPUT_2()
class RingDB: public tools::ringdb
{