forked from lthn/blockchain
coretests: fixed construct_tx_to_key for boundary condition handling for tx_version at the next block height
This commit is contained in:
parent
c69ef90249
commit
438dd74166
1 changed files with 2 additions and 1 deletions
|
|
@ -1653,7 +1653,8 @@ bool construct_tx_to_key(const currency::hard_forks_descriptor& hf,
|
|||
if (!fill_tx_sources(sources, events, blk_head, from.get_keys(), spending_amount, nmix, check_for_spends, check_for_unlocktime, use_ref_by_id))
|
||||
return false;
|
||||
|
||||
uint64_t tx_version = currency::get_tx_version(get_block_height(blk_head), hf);
|
||||
uint64_t tx_expected_block_height = get_block_height(blk_head) + 1;
|
||||
uint64_t tx_version = currency::get_tx_version(tx_expected_block_height, hf);
|
||||
boost::multiprecision::int128_t change = get_sources_total_amount(sources);
|
||||
change -= spending_amount;
|
||||
if (change < 0)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue