diff options
| author | jeffro256 <jeffro256@tutanota.com> | 2024-02-03 21:59:58 -0600 |
|---|---|---|
| committer | jeffro256 <jeffro256@tutanota.com> | 2024-04-29 00:08:53 -0500 |
| commit | dd47d03cf2b5b3dc59cd99aca247d1025679f83a (patch) | |
| tree | af4d5d6cc0accac47131a232aea40db20d167fcb /src/cryptonote_core/tx_pool.cpp | |
| parent | 81d4db08eb75ce5392c65ca6571e7b08e41b7c95 (diff) | |
| download | monzero-core-dd47d03cf2b5b3dc59cd99aca247d1025679f83a.tar.gz monzero-core-dd47d03cf2b5b3dc59cd99aca247d1025679f83a.tar.xz monzero-core-dd47d03cf2b5b3dc59cd99aca247d1025679f83a.zip | |
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
Diffstat (limited to 'src/cryptonote_core/tx_pool.cpp')
| -rw-r--r-- | src/cryptonote_core/tx_pool.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/cryptonote_core/tx_pool.cpp b/src/cryptonote_core/tx_pool.cpp index 2a3b7a5d5..0af6cab85 100644 --- a/src/cryptonote_core/tx_pool.cpp +++ b/src/cryptonote_core/tx_pool.cpp @@ -236,6 +236,15 @@ namespace cryptonote return false; } + if (!kept_by_block && tx.unlock_time) + { + LOG_PRINT_L1("transaction unlock time is not zero: " << tx.unlock_time); + tvc.m_verifivation_failed = true; + tvc.m_nonzero_unlock_time = true; + tvc.m_no_drop_offense = true; + return false; + } + // if the transaction came from a block popped from the chain, // don't check if we have its key images as spent. // TODO: Investigate why not? |
