1
0
Fork 0
forked from lthn/blockchain

chaingen: construct_tx_to_key() gets tx version from block height correctly

This commit is contained in:
sowle 2022-11-09 23:52:42 +01:00
parent 4f02abac02
commit d0862e7be8
No known key found for this signature in database
GPG key ID: C07A24B2D89D49FC

View file

@ -1508,7 +1508,7 @@ bool construct_tx_to_key(const currency::hard_forks_descriptor& hf,
std::vector<tx_destination_entry> destinations;
if (!fill_tx_sources_and_destinations(events, blk_head, from.get_keys(), to.get_public_address(), amount, fee, nmix, sources, destinations, check_for_spends, check_for_unlocktime))
return false;
uint64_t tx_version = currency::get_tx_version(get_block_height(blk_head), hf);
uint64_t tx_version = currency::get_tx_version(get_block_height(blk_head) + 1, hf); // assuming the tx will be in the next block (blk_head + 1)
return construct_tx(from.get_keys(), sources, destinations, extr, att, tx, tx_version, sk, 0, mix_attr);
}