From de8242f1bba6f3513eb9ee16a3ed3c4109c5fb32 Mon Sep 17 00:00:00 2001 From: abitmore Date: Sat, 5 Jun 2021 18:33:59 +0000 Subject: [PATCH] Move fee schedule reflection into a new file --- libraries/protocol/CMakeLists.txt | 1 + libraries/protocol/fee_schedule_calc.cpp | 5 ---- libraries/protocol/fee_schedule_reflect.cpp | 29 +++++++++++++++++++++ 3 files changed, 30 insertions(+), 5 deletions(-) create mode 100644 libraries/protocol/fee_schedule_reflect.cpp diff --git a/libraries/protocol/CMakeLists.txt b/libraries/protocol/CMakeLists.txt index 2291a4560b..15c9dc1ee4 100644 --- a/libraries/protocol/CMakeLists.txt +++ b/libraries/protocol/CMakeLists.txt @@ -8,6 +8,7 @@ list(APPEND SOURCES account.cpp chain_parameters.cpp fee_schedule.cpp fee_schedule_calc.cpp + fee_schedule_reflect.cpp memo.cpp proposal.cpp transfer.cpp diff --git a/libraries/protocol/fee_schedule_calc.cpp b/libraries/protocol/fee_schedule_calc.cpp index bac9eb424d..bde8d07775 100644 --- a/libraries/protocol/fee_schedule_calc.cpp +++ b/libraries/protocol/fee_schedule_calc.cpp @@ -24,11 +24,8 @@ #include -#include #include -#define MAX_FEE_STABILIZATION_ITERATION 4 - namespace graphene { namespace protocol { struct calc_fee_visitor @@ -96,5 +93,3 @@ namespace graphene { namespace protocol { } } } // graphene::protocol - -GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::fee_schedule ) diff --git a/libraries/protocol/fee_schedule_reflect.cpp b/libraries/protocol/fee_schedule_reflect.cpp new file mode 100644 index 0000000000..14dd0f0191 --- /dev/null +++ b/libraries/protocol/fee_schedule_reflect.cpp @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2015 Cryptonomex, Inc., and contributors. + * + * The MIT License + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include + +#include + +GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::fee_schedule )