 |
Bitcoin Core
22.99.0
P2P Digital Currency
|
Go to the documentation of this file.
11 #include <boost/test/unit_test.hpp>
14 #define NUM_MULTIPLES_UNIT 100000
17 #define NUM_MULTIPLES_CENT 10000
20 #define NUM_MULTIPLES_1BTC 10000
23 #define NUM_MULTIPLES_50BTC 420000
35 bool static TestPair(uint64_t dec, uint64_t enc) {
61 for (uint64_t i = 0; i < 100000; i++)
BOOST_AUTO_TEST_CASE(compress_amounts)
void MakeNewKey(bool fCompressed)
Generate a new private key using a cryptographic PRNG.
#define BOOST_FIXTURE_TEST_SUITE(a, b)
BOOST_AUTO_TEST_SUITE_END()
std::vector< unsigned char > ToByteVector(const T &in)
bool CompressScript(const CScript &script, CompressedScript &out)
static bool TestEncode(uint64_t in)
static constexpr CAmount CENT
#define NUM_MULTIPLES_1BTC
static bool TestPair(uint64_t dec, uint64_t enc)
static bool TestDecode(uint64_t in)
CPubKey GetPubKey() const
Compute the public key from a private key.
Serialized script, used inside transaction inputs and outputs.
Implements a drop-in replacement for std::vector<T> which stores up to N elements directly (without h...
An encapsulated public key.
An encapsulated private key.
uint64_t DecompressAmount(uint64_t x)
#define NUM_MULTIPLES_UNIT
static constexpr CAmount COIN
The amount of satoshis in one BTC.
A reference to a CScript: the Hash160 of its serialization (see script.h)
#define NUM_MULTIPLES_50BTC
#define BOOST_CHECK(expr)
uint64_t CompressAmount(uint64_t n)
Compress amount.
#define BOOST_CHECK_EQUAL(v1, v2)
CKeyID GetID() const
Get the KeyID of this public key (hash of its serialization)
#define NUM_MULTIPLES_CENT