bitcoin/src/wallet/test
laanwj 43bb106613
Merge bitcoin/bitcoin#24213: refactor: use Span in random.*
3ae7791bca refactor: use Span in random.* (pasta)

Pull request description:

  ~This PR does two things~
  1. use a Span<unsigned char> for GetRandBytes and GetStrongRandBytes

  ~2. make GetRand a template for which any integral type can be used, where the default behavior is to return a random integral up to the max of the integral unless a max is provided.
  This simplifies a lot of code from `GetRand(std::numeric_limits<uint64_t>::max()` -> `GetRand<uint64_t>()`~

  MarcoFalke this was inspired by your comment here: https://github.com/bitcoin/bitcoin/pull/24185#issuecomment-1025514263 about using Span, so hopefully I'll be able to get this PR done and merged 😂

  ~Also, if requested I could revert the `GetRand(std::numeric_limits<uint64_t>::max()` -> `GetRand<uint64_t>()` related changes if it ends up causing too many conflicts~

ACKs for top commit:
  laanwj:
    Thank you! Code review re-ACK 3ae7791bca

Tree-SHA512: 12375a83b68b288916ba0de81cfcab4aac14389a66a36811ae850427435eb67dd55e47df9ac3ec47db4e214f4330139e548bec815fff8a3f571484ea558dca79
2022-04-21 16:38:04 +02:00
..
fuzz fuzz: add target for coinselection 2022-03-30 17:17:37 +02:00
coinselector_tests.cpp test: fix incorrect named args in coin_selection tests 2022-03-25 21:27:40 +00:00
db_tests.cpp Replace use of ArgsManager with DatabaseOptions 2022-03-16 08:26:28 +01:00
init_test_fixture.cpp Replace use of ArgsManager with DatabaseOptions 2022-03-16 08:26:28 +01:00
init_test_fixture.h Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
init_tests.cpp Replace use of ArgsManager with DatabaseOptions 2022-03-16 08:26:28 +01:00
ismine_tests.cpp Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
psbt_wallet_tests.cpp doc: Delete old line of code that was commented out 2022-03-16 19:33:52 +00:00
scriptpubkeyman_tests.cpp Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
spend_tests.cpp wallet: Allow user specified input size to override 2022-01-24 11:23:31 -05:00
util.cpp Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
util.h Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
wallet_crypto_tests.cpp refactor: use Span in random.* 2022-03-23 17:36:33 -05:00
wallet_test_fixture.cpp wallet: move Assert() check into constructor 2022-03-30 17:07:28 +10:00
wallet_test_fixture.h wallet: move Assert() check into constructor 2022-03-30 17:07:28 +10:00
wallet_tests.cpp wallet: Postpone NotifyWalletLoaded() for encrypted wallets 2022-03-30 21:28:53 +02:00
wallet_transaction_tests.cpp Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
walletdb_tests.cpp Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00