forked from lthn/blockchain
fixed few tests for mainnet-compiled version
This commit is contained in:
parent
65dc4be419
commit
761fd4d6db
4 changed files with 15 additions and 5 deletions
|
|
@ -404,7 +404,7 @@ namespace currency
|
|||
#ifdef TESTNET
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -585,6 +585,9 @@ public:
|
|||
void set_hardforks(const currency::hard_forks_descriptor& hardforks);
|
||||
const currency::hard_forks_descriptor& get_hardforks() const { return m_hardforks; }
|
||||
|
||||
void load_hardforks_from(const test_chain_unit_base* pthis) { m_hardforks = pthis->get_hardforks(); }
|
||||
template<typename t_type>
|
||||
void load_hardforks_from(const t_type* pthis) {}
|
||||
|
||||
private:
|
||||
bool m_ignore_last_pow_in_wallets;
|
||||
|
|
|
|||
|
|
@ -681,6 +681,7 @@ gen_no_attchments_in_coinbase::gen_no_attchments_in_coinbase()
|
|||
|
||||
bool gen_no_attchments_in_coinbase::generate(std::vector<test_event_entry>& events) const
|
||||
{
|
||||
this->on_test_generator_created(generator);
|
||||
uint64_t ts = 1450000000;
|
||||
test_core_time::adjust(ts);
|
||||
|
||||
|
|
@ -704,7 +705,16 @@ bool gen_no_attchments_in_coinbase::init_config_set_cp(currency::core& c, size_t
|
|||
crc.pos_minimum_heigh = 1;
|
||||
c.get_blockchain_storage().set_core_runtime_config(crc);
|
||||
|
||||
m_checkpoints.add_checkpoint(12, "475331fb4a325e722ddbc2d087d32687a58392e5a9314001120de0f2ce7737f2");
|
||||
// different checkpoints due to different block versions for different hardforks -> different hashes
|
||||
if (crc.is_hardfork_active_for_height(ZANO_HARDFORK_03, 11) && !crc.is_hardfork_active_for_height(ZANO_HARDFORK_04_ZARCANUM, 11))
|
||||
{
|
||||
m_checkpoints.add_checkpoint(12, "4e6055dda442e04b2feb70bc7245584742604e8515b8d2e1c3d46c26f758d59f");
|
||||
}
|
||||
else
|
||||
{
|
||||
m_checkpoints.add_checkpoint(12, "475331fb4a325e722ddbc2d087d32687a58392e5a9314001120de0f2ce7737f2");
|
||||
}
|
||||
|
||||
c.set_checkpoints(currency::checkpoints(m_checkpoints));
|
||||
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -1778,9 +1778,6 @@ bool gen_wallet_alias_and_unconfirmed_txs::c3(currency::core& c, size_t ev_index
|
|||
|
||||
gen_wallet_alias_via_special_wallet_funcs::gen_wallet_alias_via_special_wallet_funcs()
|
||||
{
|
||||
// start hardfork from block 0 in order to use extra_alias_entry (allowed only since HF2)
|
||||
m_hardforks.set_hardfork_height(1, 0);
|
||||
m_hardforks.set_hardfork_height(2, 0);
|
||||
REGISTER_CALLBACK_METHOD(gen_wallet_alias_via_special_wallet_funcs, c1);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue