提交 d874eebb 编写于 作者: N Nathan Hourt

Fix #55

上级 6c4e89f3
......@@ -68,7 +68,7 @@ void SignedTransaction::set_reference_block(const block_id_type& reference_block
}
bool SignedTransaction::verify_reference_block(const block_id_type& reference_block) const {
return refBlockNum == fc::endian_reverse_u32(reference_block._hash[0]) &&
return refBlockNum == (decltype(refBlockNum))fc::endian_reverse_u32(reference_block._hash[0]) &&
refBlockPrefix == (decltype(refBlockPrefix))reference_block._hash[1];
}
......
......@@ -45,7 +45,7 @@ using namespace eos::chain;
extern uint32_t EOS_TESTING_GENESIS_TIMESTAMP;
#define TEST_DB_SIZE (1024*1024*10)
#define TEST_DB_SIZE (1024*1024*1000)
#define EOS_REQUIRE_THROW( expr, exc_type ) \
{ \
......
......@@ -28,6 +28,7 @@
#include <eos/chain/exceptions.hpp>
#include <eos/chain/account_object.hpp>
#include <eos/chain/key_value_object.hpp>
#include <eos/chain/block_summary_object.hpp>
#include <eos/utilities/tempdir.hpp>
......@@ -61,6 +62,17 @@ BOOST_FIXTURE_TEST_CASE(produce_blocks, testing_fixture)
BOOST_CHECK_EQUAL(chain.head_block_num(), chain.get_global_properties().active_producers.size() + 6);
} FC_LOG_AND_RETHROW() }
// Test that TaPoS still works after block 65535 (See Issue #55)
BOOST_FIXTURE_TEST_CASE(tapos_wrap, testing_fixture)
{ try {
Make_Blockchain(chain)
Make_Account(chain, acct);
Stake_Asset(chain, acct, Asset(5).amount);
elog("Hang on, this will take a minute...");
chain.produce_blocks(65536);
Begin_Unstake_Asset(chain, acct, Asset(1).amount);
} FC_LOG_AND_RETHROW() }
BOOST_FIXTURE_TEST_CASE(order_dependent_transactions, testing_fixture)
{ try {
Make_Blockchain(chain);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册