forked from lthn/blockchain
unit_tests & performance_tests: fixed compilation error
This commit is contained in:
parent
e2d84bfc3b
commit
5ff0f93027
2 changed files with 6 additions and 3 deletions
|
|
@ -17,7 +17,8 @@ public:
|
|||
|
||||
m_bob.generate();
|
||||
|
||||
if (!construct_miner_tx(0, 0, 0, 2, 0, m_bob.get_keys().account_address, m_bob.get_keys().account_address, m_tx, TRANSACTION_VERSION_PRE_HF4, blobdata(), CURRENCY_MINER_TX_MAX_OUTS))
|
||||
uint64_t block_reward_without_fee = 0;
|
||||
if (!construct_miner_tx(0, 0, 0, 2, 0, m_bob.get_keys().account_address, m_bob.get_keys().account_address, m_tx, block_reward_without_fee, TRANSACTION_VERSION_PRE_HF4, blobdata(), CURRENCY_MINER_TX_MAX_OUTS))
|
||||
return false;
|
||||
|
||||
m_tx_pub_key = get_tx_pub_key_from_extra(m_tx);
|
||||
|
|
|
|||
|
|
@ -14,7 +14,8 @@ TEST(parse_and_validate_tx_extra, is_correct_parse_and_validate_tx_extra)
|
|||
currency::account_base acc;
|
||||
acc.generate();
|
||||
currency::blobdata b = "dsdsdfsdfsf";
|
||||
bool r = currency::construct_miner_tx(0, 0, 10000000000000, 1000, TESTS_DEFAULT_FEE, acc.get_keys().account_address, acc.get_keys().account_address, tx, TRANSACTION_VERSION_PRE_HF4, b, 1);
|
||||
uint64_t block_reward_without_fee = 0;
|
||||
bool r = currency::construct_miner_tx(0, 0, 10000000000000, 1000, TESTS_DEFAULT_FEE, acc.get_keys().account_address, acc.get_keys().account_address, tx, block_reward_without_fee, TRANSACTION_VERSION_PRE_HF4, b, 1);
|
||||
ASSERT_TRUE(r);
|
||||
crypto::public_key tx_pub_key;
|
||||
r = currency::parse_and_validate_tx_extra(tx, tx_pub_key);
|
||||
|
|
@ -26,7 +27,8 @@ TEST(parse_and_validate_tx_extra, is_correct_extranonce_too_big)
|
|||
currency::account_base acc;
|
||||
acc.generate();
|
||||
currency::blobdata b(260, 0);
|
||||
bool r = currency::construct_miner_tx(0, 0, 10000000000000, 1000, TESTS_DEFAULT_FEE, acc.get_keys().account_address, acc.get_keys().account_address, tx, TRANSACTION_VERSION_PRE_HF4, b, 1);
|
||||
uint64_t block_reward_without_fee = 0;
|
||||
bool r = currency::construct_miner_tx(0, 0, 10000000000000, 1000, TESTS_DEFAULT_FEE, acc.get_keys().account_address, acc.get_keys().account_address, tx, block_reward_without_fee, TRANSACTION_VERSION_PRE_HF4, b, 1);
|
||||
ASSERT_FALSE(r);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue