From dd47d03cf2b5b3dc59cd99aca247d1025679f83a Mon Sep 17 00:00:00 2001 From: jeffro256 Date: Sat, 3 Feb 2024 21:59:58 -0600 Subject: Enforce Tx unlock_time is Zero by Relay Rule [RELEASE] Related to https://github.com/monero-project/research-lab/issues/78 Added a relay rule that enforces the `unlock_time` field is equal to 0 for non-coinbase transactions. UIs changed: * Removed `locked_transfer` and `locked_sweep_all` commands from `monero-wallet-cli` APIs changed: * Removed `unlock_time` parameters from `wallet2` transfer methods * Wallet RPC transfer endpoints send error codes when requested unlock time is not 0 * Removed `unlock_time` parameters from `construct_tx*` cryptonote core functions @tobtoht: undo rebase changes tx.dsts -> tx_dsts --- tests/core_tests/wallet_tools.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/core_tests/wallet_tools.cpp') diff --git a/tests/core_tests/wallet_tools.cpp b/tests/core_tests/wallet_tools.cpp index a3b66e835..b5155ea7b 100644 --- a/tests/core_tests/wallet_tools.cpp +++ b/tests/core_tests/wallet_tools.cpp @@ -259,7 +259,7 @@ bool construct_tx_to_key(cryptonote::transaction& tx, { vector destinations; fill_tx_destinations(sender_wallet->get_account(), get_address(to), amount, fee, sources, destinations, rct); - return construct_tx_rct(sender_wallet, sources, destinations, get_address(sender_wallet), std::vector(), tx, 0, rct, range_proof_type, bp_version); + return construct_tx_rct(sender_wallet, sources, destinations, get_address(sender_wallet), std::vector(), tx, rct, range_proof_type, bp_version); } bool construct_tx_to_key(cryptonote::transaction& tx, @@ -270,15 +270,15 @@ bool construct_tx_to_key(cryptonote::transaction& tx, { vector all_destinations; fill_tx_destinations(sender_wallet->get_account(), destinations, fee, sources, all_destinations, rct); - return construct_tx_rct(sender_wallet, sources, all_destinations, get_address(sender_wallet), std::vector(), tx, 0, rct, range_proof_type, bp_version); + return construct_tx_rct(sender_wallet, sources, all_destinations, get_address(sender_wallet), std::vector(), tx, rct, range_proof_type, bp_version); } -bool construct_tx_rct(tools::wallet2 * sender_wallet, std::vector& sources, const std::vector& destinations, const boost::optional& change_addr, std::vector extra, cryptonote::transaction& tx, uint64_t unlock_time, bool rct, rct::RangeProofType range_proof_type, int bp_version) +bool construct_tx_rct(tools::wallet2 * sender_wallet, std::vector& sources, const std::vector& destinations, const boost::optional& change_addr, std::vector extra, cryptonote::transaction& tx, bool rct, rct::RangeProofType range_proof_type, int bp_version) { subaddresses_t & subaddresses = wallet_accessor_test::get_subaddresses(sender_wallet); crypto::secret_key tx_key; std::vector additional_tx_keys; std::vector destinations_copy = destinations; rct::RCTConfig rct_config = {range_proof_type, bp_version}; - return construct_tx_and_get_tx_key(sender_wallet->get_account().get_keys(), subaddresses, sources, destinations_copy, change_addr, extra, tx, unlock_time, tx_key, additional_tx_keys, rct, rct_config); + return construct_tx_and_get_tx_key(sender_wallet->get_account().get_keys(), subaddresses, sources, destinations_copy, change_addr, extra, tx, tx_key, additional_tx_keys, rct, rct_config); } -- cgit v1.2.3