From 67e174a3baf775957d50af7da815b316d8380c16 Mon Sep 17 00:00:00 2001 From: abitmore Date: Fri, 23 Feb 2024 03:59:12 +0000 Subject: [PATCH] Test --- libraries/chain/hardfork.d/20240223.hf | 5 +++++ libraries/chain/proposal_evaluator.cpp | 1 + libraries/chain/ticket_evaluator.cpp | 1 + 3 files changed, 7 insertions(+) create mode 100644 libraries/chain/hardfork.d/20240223.hf diff --git a/libraries/chain/hardfork.d/20240223.hf b/libraries/chain/hardfork.d/20240223.hf new file mode 100644 index 0000000000..f4ba3add8e --- /dev/null +++ b/libraries/chain/hardfork.d/20240223.hf @@ -0,0 +1,5 @@ +// Ticket issues +#ifndef SOFTFORK_20240223_TIME +#define SOFTFORK_20240223_TIME (fc::time_point_sec( 1708660800 )) // Friday, February 23, 2024 4:00:00 UTC +#define SOFTFORK_20240223_PASSED(head_block_time) (head_block_time >= SOFTFORK_20240223_TIME) +#endif diff --git a/libraries/chain/proposal_evaluator.cpp b/libraries/chain/proposal_evaluator.cpp index 62efcb708e..8a353ec7c2 100644 --- a/libraries/chain/proposal_evaluator.cpp +++ b/libraries/chain/proposal_evaluator.cpp @@ -262,6 +262,7 @@ struct proposal_operation_hardfork_visitor } void operator()(const graphene::chain::ticket_create_operation&) const { FC_ASSERT( HARDFORK_CORE_2103_PASSED(block_time), "Not allowed until hardfork 2103" ); + FC_ASSERT( !SOFTFORK_20240223_PASSED(block_time), "Temporarily disabled" ); } void operator()(const graphene::chain::ticket_update_operation&) const { FC_ASSERT( HARDFORK_CORE_2103_PASSED(block_time), "Not allowed until hardfork 2103" ); diff --git a/libraries/chain/ticket_evaluator.cpp b/libraries/chain/ticket_evaluator.cpp index 9e4deeee06..8a3fd19643 100644 --- a/libraries/chain/ticket_evaluator.cpp +++ b/libraries/chain/ticket_evaluator.cpp @@ -39,6 +39,7 @@ void_result ticket_create_evaluator::do_evaluate(const ticket_create_operation& const auto block_time = d.head_block_time(); FC_ASSERT( HARDFORK_CORE_2103_PASSED(block_time), "Not allowed until hardfork 2103" ); + FC_ASSERT( !SOFTFORK_20240223_PASSED(block_time), "Temporarily disabled" ); return void_result(); } FC_CAPTURE_AND_RETHROW( (op) ) }