Monero
Macros | Functions
scaling_2021.cpp File Reference
#include "gtest/gtest.h"
#include "cryptonote_core/blockchain.h"
#include "cryptonote_core/tx_pool.h"
#include "cryptonote_core/cryptonote_core.h"
#include "blockchain_db/testdb.h"
Include dependency graph for scaling_2021.cpp:

Macros

#define IN_UNIT_TESTS
 
#define PREFIX_WINDOW(hf_version, window)
 
#define PREFIX(hf_version)   PREFIX_WINDOW(hf_version, TEST_LONG_TERM_BLOCK_WEIGHT_WINDOW)
 

Functions

 TEST (fee_2021_scaling, relay_fee_cases_from_pdf)
 
 TEST (fee_2021_scaling, wallet_fee_cases_from_pdf)
 
 TEST (fee_2021_scaling, rounding)
 

Macro Definition Documentation

◆ IN_UNIT_TESTS

#define IN_UNIT_TESTS

◆ PREFIX

#define PREFIX (   hf_version)    PREFIX_WINDOW(hf_version, TEST_LONG_TERM_BLOCK_WEIGHT_WINDOW)

◆ PREFIX_WINDOW

#define PREFIX_WINDOW (   hf_version,
  window 
)
Value:
std::unique_ptr<cryptonote::Blockchain> bc; \
cryptonote::tx_memory_pool txpool(*bc); \
bc.reset(new cryptonote::Blockchain(txpool)); \
struct get_test_options { \
const std::pair<uint8_t, uint64_t> hard_forks[3]; \
const cryptonote::test_options test_options = { \
hard_forks, \
window, \
}; \
get_test_options(): hard_forks{std::make_pair(1, (uint64_t)0), std::make_pair((uint8_t)hf_version, (uint64_t)1), std::make_pair((uint8_t)0, (uint64_t)0)} {} \
} opts; \
cryptonote::Blockchain *blockchain = bc.get(); \
bool r = blockchain->init(new TestDB(), cryptonote::FAKECHAIN, true, &opts.test_options, 0, NULL); \
ASSERT_TRUE(r)
Definition: blockchain.py:1
Definition: cryptonote_config.h:306
unsigned char uint8_t
Definition: stdint.h:124
unsigned __int64 uint64_t
Definition: stdint.h:136
Definition: cryptonote_core.h:61
r
Definition: testupnpigd.py:61
Definition: chaingen.h:725
Definition: txpool.py:1
Definition: blockchain.h:102

Function Documentation

◆ TEST() [1/3]

TEST ( fee_2021_scaling  ,
relay_fee_cases_from_pdf   
)

◆ TEST() [2/3]

TEST ( fee_2021_scaling  ,
wallet_fee_cases_from_pdf   
)

◆ TEST() [3/3]

TEST ( fee_2021_scaling  ,
rounding   
)