oxen-core/tests/unit_tests
Jason Rhinelander 6aa9db9538
Overhaul and fix crypto::{public_key,ec_point,etc.} types
- Remove implicit `operator bool` from ec_point/public_key/etc. which
  was causing all sorts of implicit conversion mess and bugs.
- Change ec_point/public_key/etc. to use a `std::array<unsigned char,
  32>` (via a base type) rather than a C-array of char that has to be
  reinterpret_cast<>'ed all over the place.
- Add methods to ec_point/public_key/etc. that make it work more like a
  container of bytes (`.data()`, `.size()`, `operator[]`, `begin()`,
  `end()`).
- Make a generic `crypto::null<T>` that is a constexpr all-0 `T`, rather
  than the mishmash `crypto::null_hash`, crypto::null_pkey,
  crypto:#️⃣:null(), and so on.
- Replace three metric tons of `crypto::hash blahblah =
  crypto::null_hash;` with the much simpler `crypto::hash blahblah{};`,
  because there's no need to make a copy of a null hash in all these
  cases.  (Likewise for a few other null_whatevers).
- Remove a whole bunch of `if (blahblah == crypto::null_hash)` and `if
  (blahblah != crypto::null_hash)` with the more concise `if
  (!blahblah)` and `if (blahblah)` (which are fine via the newly
  *explicit* bool conversion operators).
- `crypto::signature` becomes a 64-byte container (as above) but with
  `c()` and `r()` to get the c() and r() data pointers.  (Previously
  `.c` and `.r` were `ec_scalar`s).
- Delete with great prejudice CRYPTO_MAKE_COMPARABLE and
  CRYPTO_MAKE_HASHABLE and all the other utter trash in
  `crypto/generic-ops.h`.
- De-inline functions in very common crypto/*.h files so that they don't
  have to get compiled 300 times.
- Remove the disgusting include-a-C-header-inside-a-C++-namespace
  garbage from some crypto headers trying to be both a C and *different*
  C++ header at once.
- Remove the toxic, disgusting, shameful `operator&` on ec_scalar, etc.
  that replace `&x` with `reinterpret_cast x into an unsigned char*`.
  This was pure toxic waste.
- changed some `<<` outputs to fmt
- Random other small changes encountered while fixing everything that
  cascaded out of the above changes.
2022-10-17 22:20:54 -03:00
..
CMakeLists.txt Logging Refactor 2022-10-17 13:41:10 -03:00
account.cpp Replace `keypair::generate` with a `keypair` constructor taking a hwdev 2020-12-08 22:31:54 -04:00
aligned.cpp unit_tests: add unit test for alloc alignment being a power of 2 2018-10-08 11:36:42 +00:00
apply_permutation.cpp Update 2019 copyright 2019-03-05 22:05:34 +01:00
base58.cpp Remove cryptonote_config macros 2022-05-16 20:37:07 -03:00
block_queue.cpp Replace boost chrono & posix_time with stl chrono 2020-07-02 12:52:13 -03:00
block_reward.cpp Remove cryptonote_config macros 2022-05-16 20:37:07 -03:00
blockchain_db.cpp Logging Refactor 2022-10-17 13:41:10 -03:00
bulletproofs.cpp Remove stupid typedef 2022-05-20 18:30:55 -03:00
chacha.cpp Update 2019 copyright 2019-03-05 22:05:34 +01:00
checkpoints.cpp Replace hook virtual calls with std::function 2022-07-27 14:20:29 -03:00
command_line.cpp Update 2019 copyright 2019-03-05 22:05:34 +01:00
crypto.cpp Overhaul and fix crypto::{public_key,ec_point,etc.} types 2022-10-17 22:20:54 -03:00
device.cpp Fix extracted txversion/txtype 2020-12-06 23:19:20 -04:00
difficulty.cpp Move epee includes under "epee/..." 2020-10-24 12:46:27 -03:00
epee_boosted_tcp_server.cpp Move epee includes under "epee/..." 2020-10-24 12:46:27 -03:00
epee_levin_protocol_handler_async.cpp all tests building now, not all passing 2022-09-07 19:34:52 -04:00
epee_utils.cpp all tests building now, not all passing 2022-09-07 19:34:52 -04:00
expect.cpp Replace boost::string_ref with std::string_view 2020-07-02 12:52:12 -03:00
get_xtype_from_string.cpp Move epee includes under "epee/..." 2020-10-24 12:46:27 -03:00
hashchain.cpp Overhaul and fix crypto::{public_key,ec_point,etc.} types 2022-10-17 22:20:54 -03:00
hmac_keccak.cpp unit_tests: fix missing test names 2020-02-18 23:56:21 +00:00
keccak.cpp Merge commit '309f2def9e3357174904d29040883a70ff0cbd68' into MergeUpstream 2020-04-07 14:24:36 +10:00
levin.cpp Remove stupid typedef 2022-05-20 18:30:55 -03:00
lmdb.cpp Adding classes, functions, and utilities for common LMDB operations. 2019-03-19 17:52:26 +00:00
logging.cpp trace noop in release build 2022-10-17 13:45:23 -03:00
long_term_block_weight.cpp Overhaul and fix crypto::{public_key,ec_point,etc.} types 2022-10-17 22:20:54 -03:00
main.cpp Logging Refactor 2022-10-17 13:41:10 -03:00
median.cpp More epee purging 2022-04-15 13:51:57 -03:00
memwipe.cpp Logging Refactor 2022-10-17 13:41:10 -03:00
mlocker.cpp Move epee includes under "epee/..." 2020-10-24 12:46:27 -03:00
mnemonics.cpp Overhaul and fix crypto::{public_key,ec_point,etc.} types 2022-10-17 22:20:54 -03:00
mul_div.cpp 128 bit optimizations 2022-06-19 12:36:40 -03:00
multiexp.cpp Logging Refactor 2022-10-17 13:41:10 -03:00
multisig.cpp Logging Refactor 2022-10-17 13:41:10 -03:00
net.cpp Replace boost::endian conversion with oxenc 1.0.3 2022-05-24 17:35:59 -03:00
node_server.cpp Overhaul and fix crypto::{public_key,ec_point,etc.} types 2022-10-17 22:20:54 -03:00
notify.cpp Rewrite trash tools::Notify 2022-07-27 17:25:48 -03:00
output_distribution.cpp Overhaul and fix crypto::{public_key,ec_point,etc.} types 2022-10-17 22:20:54 -03:00
output_selection.cpp Overhaul and fix crypto::{public_key,ec_point,etc.} types 2022-10-17 22:20:54 -03:00
oxen_name_system.cpp Eliminate most << output operators 2022-10-17 13:45:24 -03:00
parse_address.cpp Remove cryptonote_config macros 2022-05-16 20:37:07 -03:00
parse_amount.cpp Make cryptonote::parse_amount return an optional 2022-04-15 17:54:03 -03:00
pruning.cpp Remove cryptonote_config macros 2022-05-16 20:37:07 -03:00
random.cpp fix 2020-12-03 12:55:11 -04:00
random_path.h std::filesystem 2020-10-24 12:45:37 -03:00
ringct.cpp Eliminate most << output operators 2022-10-17 13:45:24 -03:00
ringdb.cpp Replace `keypair::generate` with a `keypair` constructor taking a hwdev 2020-12-08 22:31:54 -04:00
rolling_median.cpp More epee purging 2022-04-15 13:51:57 -03:00
serialization.cpp Overhaul and fix crypto::{public_key,ec_point,etc.} types 2022-10-17 22:20:54 -03:00
service_nodes.cpp Atomic staking amounts 2022-05-24 17:36:24 -03:00
service_nodes_swarm.cpp Logging Refactor 2022-10-17 13:41:10 -03:00
sha256.cpp Remove deprecated epee code 2020-10-24 12:46:26 -03:00
sqlite.cpp Optimization: reuse reward vector 2022-06-19 12:36:40 -03:00
string_util.cpp Fix hex_to_type and add a unit test for it 2020-07-02 12:56:37 -03:00
subaddress.cpp Logging Refactor 2022-10-17 13:41:10 -03:00
test_notifier.cpp unit_tests: add a notifier test 2018-10-01 09:14:20 +00:00
test_peerlist.cpp Move epee includes under "epee/..." 2020-10-24 12:46:27 -03:00
test_protocol_pack.cpp Move epee includes under "epee/..." 2020-10-24 12:46:27 -03:00
test_tx_utils.cpp Overhaul and fix crypto::{public_key,ec_point,etc.} types 2022-10-17 22:20:54 -03:00
testdb.h Remove stupid typedef 2022-05-20 18:30:55 -03:00
threadpool.cpp More epee purging 2022-04-15 13:51:57 -03:00
unbound.cpp Update 2019 copyright 2019-03-05 22:05:34 +01:00
unit_tests_utils.h std::filesystem 2020-10-24 12:45:37 -03:00
uri.cpp Remove cryptonote_config macros 2022-05-16 20:37:07 -03:00
varint.cpp Overhaul binary serialization code (part 1) 2020-07-02 12:52:12 -03:00
vercmp.cpp Update 2019 copyright 2019-03-05 22:05:34 +01:00
wipeable_string.cpp Replace epee hex with oxen-encoding 2022-04-14 14:34:50 -03:00