diff --git a/libraries/app/application.cpp b/libraries/app/application.cpp index fb4a1546..4d627a93 100644 --- a/libraries/app/application.cpp +++ b/libraries/app/application.cpp @@ -20,13 +20,15 @@ #include #include +#include +#include + #include #include #include -#include -#include + #include #include diff --git a/libraries/app/include/graphene/app/api.hpp b/libraries/app/include/graphene/app/api.hpp index cbbd267a..8eb4359f 100644 --- a/libraries/app/include/graphene/app/api.hpp +++ b/libraries/app/include/graphene/app/api.hpp @@ -16,9 +16,13 @@ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #pragma once -#include + +#include + #include + #include + #include #include #include @@ -27,11 +31,12 @@ #include #include #include + #include -#include #include -#include + +#include #include diff --git a/libraries/chain/CMakeLists.txt b/libraries/chain/CMakeLists.txt index a2b95a23..50c63045 100644 --- a/libraries/chain/CMakeLists.txt +++ b/libraries/chain/CMakeLists.txt @@ -18,7 +18,6 @@ add_library( graphene_chain # db_witness_schedule.cpp protocol/types.cpp - protocol/chain_id.cpp protocol/address.cpp protocol/authority.cpp protocol/asset.cpp diff --git a/libraries/chain/include/graphene/chain/genesis_state.hpp b/libraries/chain/include/graphene/chain/genesis_state.hpp index b2594f5a..87bc9d7d 100644 --- a/libraries/chain/include/graphene/chain/genesis_state.hpp +++ b/libraries/chain/include/graphene/chain/genesis_state.hpp @@ -1,7 +1,6 @@ #pragma once #include -#include #include #include diff --git a/libraries/chain/include/graphene/chain/global_property_object.hpp b/libraries/chain/include/graphene/chain/global_property_object.hpp index f64d8527..2771ffcc 100644 --- a/libraries/chain/include/graphene/chain/global_property_object.hpp +++ b/libraries/chain/include/graphene/chain/global_property_object.hpp @@ -18,8 +18,8 @@ #pragma once #include -#include #include +#include #include #include diff --git a/libraries/chain/include/graphene/chain/protocol/chain_id.hpp b/libraries/chain/include/graphene/chain/protocol/chain_id.hpp deleted file mode 100644 index 05dc0cc5..00000000 --- a/libraries/chain/include/graphene/chain/protocol/chain_id.hpp +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 2015, Cryptonomex, Inc. - * All rights reserved. - * - * This source code is provided for evaluation in private test networks only, until September 8, 2015. After this date, this license expires and - * the code may not be used, modified or distributed for any purpose. Redistribution and use in source and binary forms, with or without modification, - * are permitted until September 8, 2015, provided that the following conditions are met: - * - * 1. The code and/or derivative works are used only for private test networks consisting of no more than 10 P2P nodes. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -#pragma once - -#include -#include - -namespace graphene { namespace chain { - -typedef fc::sha256 chain_id_type; - -/** - * Get the current chain ID. The chain ID is stored in a global - * variable. Accessing multiple Graphene-based chains from a single - * process is not supported. Returns the last chain ID set with - * set_current_chain_id(), or an invalid optional if never set. - */ -fc::optional get_current_chain_id(); - -/** - * Set the global chain ID. The chain ID is stored in a global - * variable. Accessing multiple Graphene-based chains from a single - * process is not supported. - */ -void set_current_chain_id( const fc::optional& chain_id ); - -} } diff --git a/libraries/chain/include/graphene/chain/protocol/transaction.hpp b/libraries/chain/include/graphene/chain/protocol/transaction.hpp index 5580ad6b..c786e417 100644 --- a/libraries/chain/include/graphene/chain/protocol/transaction.hpp +++ b/libraries/chain/include/graphene/chain/protocol/transaction.hpp @@ -16,8 +16,8 @@ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #pragma once -#include #include +#include #include diff --git a/libraries/chain/include/graphene/chain/protocol/types.hpp b/libraries/chain/include/graphene/chain/protocol/types.hpp index e3265145..e9b5ea7b 100644 --- a/libraries/chain/include/graphene/chain/protocol/types.hpp +++ b/libraries/chain/include/graphene/chain/protocol/types.hpp @@ -76,6 +76,7 @@ namespace graphene { namespace chain { struct void_t{}; typedef fc::ecc::private_key private_key_type; + typedef fc::sha256 chain_id_type; enum asset_issuer_permission_flags { diff --git a/libraries/chain/protocol/chain_id.cpp b/libraries/chain/protocol/chain_id.cpp deleted file mode 100644 index 41df6224..00000000 --- a/libraries/chain/protocol/chain_id.cpp +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2015, Cryptonomex, Inc. - * All rights reserved. - * - * This source code is provided for evaluation in private test networks only, until September 8, 2015. After this date, this license expires and - * the code may not be used, modified or distributed for any purpose. Redistribution and use in source and binary forms, with or without modification, - * are permitted until September 8, 2015, provided that the following conditions are met: - * - * 1. The code and/or derivative works are used only for private test networks consisting of no more than 10 P2P nodes. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include -#include -#include -#include - -namespace graphene { namespace chain { - -chain_id_type the_chain_id; -bool the_chain_id_initialized = false; - -fc::optional< chain_id_type > get_current_chain_id() -{ - optional< chain_id_type > result; - if( the_chain_id_initialized ) - result = the_chain_id; - return result; -} - -void set_current_chain_id( const fc::optional& chain_id ) -{ - bool valid = chain_id.valid(); - the_chain_id_initialized = valid; - if( valid ) - the_chain_id = *chain_id; - return; -} - -} } // graphene::chain diff --git a/libraries/egenesis/egenesis_brief.cpp.tmpl b/libraries/egenesis/egenesis_brief.cpp.tmpl index f7d295e8..8ee2ba3b 100644 --- a/libraries/egenesis/egenesis_brief.cpp.tmpl +++ b/libraries/egenesis/egenesis_brief.cpp.tmpl @@ -17,7 +17,7 @@ ${generated_file_banner} * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include +#include #include namespace graphene { namespace egenesis { diff --git a/libraries/egenesis/egenesis_full.cpp.tmpl b/libraries/egenesis/egenesis_full.cpp.tmpl index a5c41e8b..7054e20f 100644 --- a/libraries/egenesis/egenesis_full.cpp.tmpl +++ b/libraries/egenesis/egenesis_full.cpp.tmpl @@ -17,7 +17,7 @@ ${generated_file_banner} * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include +#include #include namespace graphene { namespace egenesis { diff --git a/libraries/egenesis/egenesis_none.cpp b/libraries/egenesis/egenesis_none.cpp index 3f293b64..99c0b953 100644 --- a/libraries/egenesis/egenesis_none.cpp +++ b/libraries/egenesis/egenesis_none.cpp @@ -16,7 +16,6 @@ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include #include namespace graphene { namespace egenesis { diff --git a/libraries/egenesis/embed_genesis.cpp b/libraries/egenesis/embed_genesis.cpp index f3d1edd5..423fb46d 100644 --- a/libraries/egenesis/embed_genesis.cpp +++ b/libraries/egenesis/embed_genesis.cpp @@ -28,8 +28,8 @@ #include #include #include -#include #include +#include // we need to include the world in order to serialize fee_parameters #include diff --git a/libraries/egenesis/include/graphene/egenesis/egenesis.hpp b/libraries/egenesis/include/graphene/egenesis/egenesis.hpp index 2e471de3..546f6a5a 100644 --- a/libraries/egenesis/include/graphene/egenesis/egenesis.hpp +++ b/libraries/egenesis/include/graphene/egenesis/egenesis.hpp @@ -4,7 +4,7 @@ #include #include -#include +#include #include namespace graphene { namespace egenesis { diff --git a/libraries/net/include/graphene/net/node.hpp b/libraries/net/include/graphene/net/node.hpp index 544a59ae..b8685ff9 100644 --- a/libraries/net/include/graphene/net/node.hpp +++ b/libraries/net/include/graphene/net/node.hpp @@ -21,7 +21,6 @@ #include #include -#include #include #include