more compilation fixes

This commit is contained in:
sowle 2024-02-09 15:22:43 +01:00
parent c97e17b494
commit ab226469a9
No known key found for this signature in database
GPG key ID: C07A24B2D89D49FC
2 changed files with 8 additions and 4 deletions

View file

@ -65,6 +65,7 @@ bool create_block_template_manually(const currency::block& prev_block, boost::mu
// make things really simple by assuming block size is less than CURRENCY_BLOCK_GRANTED_FULL_REWARD_ZONE
size_t median_size = 0;
uint64_t block_reward_without_fee = 0;
uint64_t block_reward = 0;
bool r = construct_miner_tx(get_block_height(prev_block) + 1,
median_size,
@ -75,6 +76,7 @@ bool create_block_template_manually(const currency::block& prev_block, boost::mu
miner_addr,
result.miner_tx,
block_reward_without_fee,
block_reward,
TRANSACTION_VERSION_PRE_HF4);
CHECK_AND_ASSERT_MES(r, false, "construct_miner_tx failed");

View file

@ -14,8 +14,9 @@ TEST(parse_and_validate_tx_extra, is_correct_parse_and_validate_tx_extra)
currency::account_base acc;
acc.generate();
currency::blobdata b = "dsdsdfsdfsf";
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);
uint64_t block_reward_without_fee = 0, block_reward = 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, block_reward, 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);
@ -27,8 +28,9 @@ TEST(parse_and_validate_tx_extra, is_correct_extranonce_too_big)
currency::account_base acc;
acc.generate();
currency::blobdata b(260, 0);
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);
uint64_t block_reward_without_fee = 0, block_reward = 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, block_reward, TRANSACTION_VERSION_PRE_HF4, b, 1);
ASSERT_FALSE(r);
}