コード例 #1
0
ファイル: chain_split_1.cpp プロジェクト: BanCurrency/ban
//-----------------------------------------------------------------------------------------------------
bool gen_simple_chain_split_1::check_split_not_switched2(cryptonote::core& c, size_t ev_index, const std::vector<test_event_entry> &events)
{
    DEFINE_TESTS_ERROR_CONTEXT("gen_simple_chain_split_1::check_split_not_switched2");
    //check height
    CHECK_TEST_CONDITION(c.get_current_blockchain_height() == 9);
    CHECK_TEST_CONDITION(c.get_blockchain_total_transactions() == 9);
    CHECK_TEST_CONDITION(c.get_tail_id() == get_block_hash(boost::get<cryptonote::block>(events[8])));
    CHECK_TEST_CONDITION(c.get_alternative_blocks_count() == 3);
    return true;
}
コード例 #2
0
bool DoubleSpendBase::check_double_spend(CryptoNote::core& c, size_t /*ev_index*/, const std::vector<test_event_entry>& events)
{
  DEFINE_TESTS_ERROR_CONTEXT("DoubleSpendBase::check_double_spend");
  CHECK_EQ(m_last_valid_block, c.get_tail_id());
  return true;
}
コード例 #3
0
bool DoubleSpendBase::mark_last_valid_block(CryptoNote::core& c, size_t /*ev_index*/, const std::vector<test_event_entry>& /*events*/)
{
  m_last_valid_block = c.get_tail_id();
  return true;
}