diff --git a/Builds/VisualStudio2013/RippleD.vcxproj b/Builds/VisualStudio2013/RippleD.vcxproj index 76df0dc906..5a8bd79802 100644 --- a/Builds/VisualStudio2013/RippleD.vcxproj +++ b/Builds/VisualStudio2013/RippleD.vcxproj @@ -2108,10 +2108,16 @@ + + + + + + @@ -2180,6 +2186,8 @@ + + @@ -2238,7 +2246,7 @@ - + @@ -2258,6 +2266,9 @@ + + True + True @@ -2609,19 +2620,32 @@ + + + + True + + True + + + True + True True + + True + True @@ -2643,9 +2667,6 @@ True - - True - True @@ -2670,6 +2691,9 @@ True + + True + True @@ -2690,6 +2714,8 @@ + + @@ -2702,6 +2728,10 @@ + + + + @@ -2736,12 +2766,19 @@ + + + + True + + + @@ -2804,8 +2841,6 @@ - - True @@ -2859,6 +2894,8 @@ True + + True @@ -2999,9 +3036,6 @@ - - True - True @@ -3075,6 +3109,9 @@ True + + True + @@ -3158,38 +3195,6 @@ - - - - - - - - - - - - True - - - True - - - True - - - True - - - - - - - - - - - @@ -3230,8 +3235,6 @@ - - ..\..\src\leveldb;..\..\src\leveldb\include;..\..\src\snappy\config;..\..\src\snappy\snappy;%(AdditionalIncludeDirectories) ..\..\src\leveldb;..\..\src\leveldb\include;..\..\src\snappy\config;..\..\src\snappy\snappy;%(AdditionalIncludeDirectories) @@ -3264,8 +3267,6 @@ - - @@ -3274,8 +3275,6 @@ ..\..\src\snappy\config;..\..\src\snappy\snappy;%(AdditionalIncludeDirectories) ..\..\src\snappy\config;..\..\src\snappy\snappy;%(AdditionalIncludeDirectories) - - diff --git a/Builds/VisualStudio2013/RippleD.vcxproj.filters b/Builds/VisualStudio2013/RippleD.vcxproj.filters index c4a983b540..9a9a59cb1a 100644 --- a/Builds/VisualStudio2013/RippleD.vcxproj.filters +++ b/Builds/VisualStudio2013/RippleD.vcxproj.filters @@ -403,6 +403,9 @@ {0AFA29AA-2CF8-9A4D-112E-AA1044C005EC} + + {7BA15EDF-461E-A27A-09D1-3309F558AAD0} + {7F5082C0-3323-CAC3-1868-CA49C7F63A34} @@ -433,12 +436,6 @@ {1D95DF26-0788-BD2C-2864-8B038A51FD58} - - {29DBD04F-9324-A965-5C79-AA06EC10BA58} - - - {2E700221-055D-6F53-BBDE-3949795A358A} - {5DB3CD0B-B361-B301-9562-697CA8A52B68} @@ -3036,12 +3033,21 @@ ripple\app\websocket + + ripple\basics + ripple\basics ripple\basics + + ripple\basics + + + ripple\basics + ripple\basics @@ -3123,6 +3129,9 @@ ripple\basics + + ripple\basics + ripple\basics @@ -3201,8 +3210,8 @@ ripple\core - - ripple\core + + ripple\crypto ripple\crypto @@ -3231,6 +3240,9 @@ ripple\crypto + + ripple\crypto\impl + ripple\crypto\impl @@ -3666,21 +3678,36 @@ ripple\peerfinder + + ripple\protocol + ripple\protocol + + ripple\protocol + ripple\protocol ripple\protocol\impl + + ripple\protocol\impl + + + ripple\protocol\impl + ripple\protocol\impl ripple\protocol\impl + + ripple\protocol\impl + ripple\protocol\impl @@ -3702,9 +3729,6 @@ ripple\protocol\impl - - ripple\protocol\impl - ripple\protocol\impl @@ -3729,6 +3753,9 @@ ripple\protocol\impl + + ripple\protocol\impl + ripple\protocol\impl @@ -3750,6 +3777,9 @@ ripple\protocol + + ripple\protocol + ripple\protocol @@ -3768,6 +3798,12 @@ ripple\protocol + + ripple\protocol + + + ripple\protocol + ripple\protocol @@ -3819,15 +3855,24 @@ ripple\protocol + + ripple\protocol + ripple\protocol + + ripple\protocol\tests + ripple\protocol ripple\protocol + + ripple\protocol + ripple\protocol @@ -3897,9 +3942,6 @@ ripple\rpc - - ripple\rpc - ripple\rpc\handlers @@ -3954,6 +3996,9 @@ ripple\rpc\handlers + + ripple\rpc\handlers + ripple\rpc\handlers @@ -4098,9 +4143,6 @@ ripple\rpc\impl - - ripple\rpc\impl - ripple\rpc\impl @@ -4185,6 +4227,9 @@ ripple\rpc\impl + + ripple\rpc\impl + ripple\rpc @@ -4296,48 +4341,6 @@ ripple\sitefiles - - ripple\types - - - ripple\types - - - ripple\types - - - ripple\types - - - ripple\types - - - ripple\types\impl - - - ripple\types\impl - - - ripple\types\impl - - - ripple\types\impl - - - ripple\types - - - ripple\types - - - ripple\types - - - ripple\types - - - ripple\types - ripple\unity @@ -4395,9 +4398,6 @@ ripple\unity - - ripple\unity - ripple\unity @@ -4437,9 +4437,6 @@ ripple\unity - - ripple\unity - ripple\unity @@ -4449,9 +4446,6 @@ ripple\unity - - ripple\unity - ripple\unity diff --git a/SConstruct b/SConstruct index 1f32cb96f9..b1309b67d9 100644 --- a/SConstruct +++ b/SConstruct @@ -582,7 +582,6 @@ for toolchain in all_toolchains: 'rpcx.cpp', 'server.cpp', 'sitefiles.cpp', - 'types.cpp', 'validators.cpp', 'websocket.cpp', ) diff --git a/src/ripple/app/book/Types.h b/src/ripple/app/book/Types.h index 6e3b99c167..79a035dd1d 100644 --- a/src/ripple/app/book/Types.h +++ b/src/ripple/app/book/Types.h @@ -21,7 +21,7 @@ #define RIPPLE_CORE_TYPES_H_INCLUDED #include -#include +#include #include #include diff --git a/src/ripple/app/consensus/DisputedTx.h b/src/ripple/app/consensus/DisputedTx.h index 8b187233b0..c517e14445 100644 --- a/src/ripple/app/consensus/DisputedTx.h +++ b/src/ripple/app/consensus/DisputedTx.h @@ -22,7 +22,7 @@ #include #include -#include +#include #include namespace ripple { diff --git a/src/ripple/app/consensus/LedgerConsensus.cpp b/src/ripple/app/consensus/LedgerConsensus.cpp index 7eefccc157..46e35c7563 100644 --- a/src/ripple/app/consensus/LedgerConsensus.cpp +++ b/src/ripple/app/consensus/LedgerConsensus.cpp @@ -19,6 +19,7 @@ #include #include +#include #include #include #include diff --git a/src/ripple/app/consensus/LedgerConsensus.h b/src/ripple/app/consensus/LedgerConsensus.h index 682707e322..100e72e3ea 100644 --- a/src/ripple/app/consensus/LedgerConsensus.h +++ b/src/ripple/app/consensus/LedgerConsensus.h @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/ripple/app/data/Database.h b/src/ripple/app/data/Database.h index 4d98a9768d..78071626d7 100644 --- a/src/ripple/app/data/Database.h +++ b/src/ripple/app/data/Database.h @@ -20,7 +20,7 @@ #ifndef RIPPLE_DATABASE_H_INCLUDED #define RIPPLE_DATABASE_H_INCLUDED -#include +#include namespace ripple { diff --git a/src/ripple/app/ledger/BookListeners.cpp b/src/ripple/app/ledger/BookListeners.cpp index da9c3761a5..9784c36ccf 100644 --- a/src/ripple/app/ledger/BookListeners.cpp +++ b/src/ripple/app/ledger/BookListeners.cpp @@ -17,6 +17,8 @@ */ //============================================================================== +#include + namespace ripple { void BookListeners::addSubscriber (InfoSub::ref sub) diff --git a/src/ripple/app/ledger/InboundLedgers.h b/src/ripple/app/ledger/InboundLedgers.h index d8a1f41afe..f5a0339193 100644 --- a/src/ripple/app/ledger/InboundLedgers.h +++ b/src/ripple/app/ledger/InboundLedgers.h @@ -21,7 +21,7 @@ #define RIPPLE_INBOUNDLEDGERS_H #include -#include +#include #include #include // diff --git a/src/ripple/app/ledger/Ledger.cpp b/src/ripple/app/ledger/Ledger.cpp index 9e4deee002..13bb0d3256 100644 --- a/src/ripple/app/ledger/Ledger.cpp +++ b/src/ripple/app/ledger/Ledger.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include diff --git a/src/ripple/app/ledger/Ledger.h b/src/ripple/app/ledger/Ledger.h index dc9d6ac733..6333144bc4 100644 --- a/src/ripple/app/ledger/Ledger.h +++ b/src/ripple/app/ledger/Ledger.h @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include namespace ripple { diff --git a/src/ripple/app/ledger/LedgerCleaner.h b/src/ripple/app/ledger/LedgerCleaner.h index 7801d94c47..794f5d188c 100644 --- a/src/ripple/app/ledger/LedgerCleaner.h +++ b/src/ripple/app/ledger/LedgerCleaner.h @@ -22,6 +22,7 @@ #include // #include +#include #include namespace ripple { diff --git a/src/ripple/app/ledger/LedgerHistory.h b/src/ripple/app/ledger/LedgerHistory.h index f8944e5268..061b7aea99 100644 --- a/src/ripple/app/ledger/LedgerHistory.h +++ b/src/ripple/app/ledger/LedgerHistory.h @@ -20,7 +20,7 @@ #ifndef RIPPLE_LEDGERHISTORY_H #define RIPPLE_LEDGERHISTORY_H -#include +#include #include namespace ripple { diff --git a/src/ripple/app/ledger/LedgerMaster.h b/src/ripple/app/ledger/LedgerMaster.h index 1400a873ab..850d220c7f 100644 --- a/src/ripple/app/ledger/LedgerMaster.h +++ b/src/ripple/app/ledger/LedgerMaster.h @@ -21,10 +21,11 @@ #define RIPPLE_LEDGERMASTER_H_INCLUDED #include -#include +#include #include #include #include +#include namespace ripple { diff --git a/src/ripple/app/main/Application.cpp b/src/ripple/app/main/Application.cpp index 38a5316384..49c53ee614 100644 --- a/src/ripple/app/main/Application.cpp +++ b/src/ripple/app/main/Application.cpp @@ -19,13 +19,14 @@ #include #include +#include #include #include #include #include #include #include -#include +#include #include #include #include diff --git a/src/ripple/app/main/FullBelowCache.h b/src/ripple/app/main/FullBelowCache.h index 90840ce361..4c49616f10 100644 --- a/src/ripple/app/main/FullBelowCache.h +++ b/src/ripple/app/main/FullBelowCache.h @@ -20,7 +20,7 @@ #ifndef RIPPLE_FULLBELOWCACHE_H_INCLUDED #define RIPPLE_FULLBELOWCACHE_H_INCLUDED -#include +#include #include namespace ripple { diff --git a/src/ripple/app/main/Main.cpp b/src/ripple/app/main/Main.cpp index 2fc6ccddea..44501d095d 100644 --- a/src/ripple/app/main/Main.cpp +++ b/src/ripple/app/main/Main.cpp @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include diff --git a/src/ripple/app/misc/CanonicalTXSet.h b/src/ripple/app/misc/CanonicalTXSet.h index 69edb74684..ec3468dbd6 100644 --- a/src/ripple/app/misc/CanonicalTXSet.h +++ b/src/ripple/app/misc/CanonicalTXSet.h @@ -20,7 +20,7 @@ #ifndef RIPPLE_CANONICALTXSET_H #define RIPPLE_CANONICALTXSET_H -#include +#include namespace ripple { diff --git a/src/ripple/app/misc/FeeVote.h b/src/ripple/app/misc/FeeVote.h index 675d8a74f6..d4694ff2b0 100644 --- a/src/ripple/app/misc/FeeVote.h +++ b/src/ripple/app/misc/FeeVote.h @@ -21,7 +21,7 @@ #define RIPPLE_APP_FEEVOTE_H_INCLUDED #include -#include +#include namespace ripple { diff --git a/src/ripple/app/misc/NetworkOPs.cpp b/src/ripple/app/misc/NetworkOPs.cpp index 486c18b56e..3a3ee9dda2 100644 --- a/src/ripple/app/misc/NetworkOPs.cpp +++ b/src/ripple/app/misc/NetworkOPs.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include diff --git a/src/ripple/app/misc/SHAMapStore.h b/src/ripple/app/misc/SHAMapStore.h index 9786bc544a..03a2b6478c 100644 --- a/src/ripple/app/misc/SHAMapStore.h +++ b/src/ripple/app/misc/SHAMapStore.h @@ -23,7 +23,7 @@ #include #include #include -#include +#include namespace ripple { diff --git a/src/ripple/app/paths/PathRequest.cpp b/src/ripple/app/paths/PathRequest.cpp index 8227550b67..b1f5f99bf8 100644 --- a/src/ripple/app/paths/PathRequest.cpp +++ b/src/ripple/app/paths/PathRequest.cpp @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/ripple/app/paths/PathState.cpp b/src/ripple/app/paths/PathState.cpp index 78b7c52767..74c630c505 100644 --- a/src/ripple/app/paths/PathState.cpp +++ b/src/ripple/app/paths/PathState.cpp @@ -18,6 +18,7 @@ //============================================================================== #include +#include namespace ripple { diff --git a/src/ripple/app/paths/Pathfinder.cpp b/src/ripple/app/paths/Pathfinder.cpp index e541def8b8..66451b496f 100644 --- a/src/ripple/app/paths/Pathfinder.cpp +++ b/src/ripple/app/paths/Pathfinder.cpp @@ -19,6 +19,7 @@ #include #include +#include #include #include diff --git a/src/ripple/app/paths/Types.h b/src/ripple/app/paths/Types.h index 72daf6afc1..d0b6605623 100644 --- a/src/ripple/app/paths/Types.h +++ b/src/ripple/app/paths/Types.h @@ -17,8 +17,8 @@ */ //============================================================================== -#ifndef RIPPLE_TYPES_H -#define RIPPLE_TYPES_H +#ifndef RIPPLE_TYPES_H_INCLUDED +#define RIPPLE_TYPES_H_INCLUDED namespace ripple { diff --git a/src/ripple/app/shamap/SHAMapItem.h b/src/ripple/app/shamap/SHAMapItem.h index 8bb8752b02..3caee35729 100644 --- a/src/ripple/app/shamap/SHAMapItem.h +++ b/src/ripple/app/shamap/SHAMapItem.h @@ -22,7 +22,7 @@ #include #include -#include +#include #include namespace ripple { diff --git a/src/ripple/app/shamap/SHAMapNodeID.h b/src/ripple/app/shamap/SHAMapNodeID.h index 983234cd97..608bfef39a 100644 --- a/src/ripple/app/shamap/SHAMapNodeID.h +++ b/src/ripple/app/shamap/SHAMapNodeID.h @@ -21,7 +21,7 @@ #define RIPPLE_SHAMAPNODEID_H #include -#include +#include #include #include #include diff --git a/src/ripple/app/transactors/CreateOffer.cpp b/src/ripple/app/transactors/CreateOffer.cpp index 5c15e55499..444d802ece 100644 --- a/src/ripple/app/transactors/CreateOffer.cpp +++ b/src/ripple/app/transactors/CreateOffer.cpp @@ -21,6 +21,7 @@ #include #include #include +#include #include diff --git a/src/ripple/app/tx/TransactionMeta.cpp b/src/ripple/app/tx/TransactionMeta.cpp index cb3b7b367a..91b111de46 100644 --- a/src/ripple/app/tx/TransactionMeta.cpp +++ b/src/ripple/app/tx/TransactionMeta.cpp @@ -17,6 +17,7 @@ */ //============================================================================== +#include #include namespace ripple { diff --git a/src/ripple/app/websocket/WSConnection.h b/src/ripple/app/websocket/WSConnection.h index 696649afed..2ba9ac3145 100644 --- a/src/ripple/app/websocket/WSConnection.h +++ b/src/ripple/app/websocket/WSConnection.h @@ -23,6 +23,7 @@ #include #include #include +#include #include #include diff --git a/src/ripple/app/websocket/WSServerHandler.h b/src/ripple/app/websocket/WSServerHandler.h index 43591fde38..3224077ec9 100644 --- a/src/ripple/app/websocket/WSServerHandler.h +++ b/src/ripple/app/websocket/WSServerHandler.h @@ -23,6 +23,7 @@ #include #include #include +#include #include namespace ripple { diff --git a/src/ripple/unity/rpcx.h b/src/ripple/basics/Blob.h similarity index 79% rename from src/ripple/unity/rpcx.h rename to src/ripple/basics/Blob.h index ddf8eb25fd..51e061b96e 100644 --- a/src/ripple/unity/rpcx.h +++ b/src/ripple/basics/Blob.h @@ -17,11 +17,18 @@ */ //============================================================================== -#ifndef RIPPLE_RPC_H_INCLUDED -#define RIPPLE_RPC_H_INCLUDED +#ifndef RIPPLE_BASICS_BLOB_H_INCLUDED +#define RIPPLE_BASICS_BLOB_H_INCLUDED -#include -#include -#include +#include + +namespace ripple { + +/** Storage for linear binary data. + Blocks of binary data appear often in various idioms and structures. +*/ +typedef std::vector Blob; + +} #endif diff --git a/src/ripple/types/ByteOrder.h b/src/ripple/basics/ByteOrder.h similarity index 94% rename from src/ripple/types/ByteOrder.h rename to src/ripple/basics/ByteOrder.h index 6a097ac9fe..02a098dabd 100644 --- a/src/ripple/types/ByteOrder.h +++ b/src/ripple/basics/ByteOrder.h @@ -17,8 +17,8 @@ */ //============================================================================== -#ifndef RIPPLE_TYPES_BYTEORDER_H -#define RIPPLE_TYPES_BYTEORDER_H +#ifndef RIPPLE_BASICS_BYTEORDER_H +#define RIPPLE_BASICS_BYTEORDER_H #include @@ -36,6 +36,7 @@ namespace ripple { +// VFALCO These are all deprecated please use the ones in // Routines for converting endianness // Reference: http://www.mail-archive.com/licq-commits@googlegroups.com/msg02334.html diff --git a/src/ripple/basics/StringUtilities.h b/src/ripple/basics/StringUtilities.h index 63ed2b6f53..7abdc6be86 100644 --- a/src/ripple/basics/StringUtilities.h +++ b/src/ripple/basics/StringUtilities.h @@ -20,9 +20,9 @@ #ifndef RIPPLE_BASICS_STRINGUTILITIES_H_INCLUDED #define RIPPLE_BASICS_STRINGUTILITIES_H_INCLUDED -#include -#include -#include +#include +#include +#include #include #include #include diff --git a/src/ripple/basics/base_uint.h b/src/ripple/basics/base_uint.h new file mode 100644 index 0000000000..11340aace6 --- /dev/null +++ b/src/ripple/basics/base_uint.h @@ -0,0 +1,541 @@ +//------------------------------------------------------------------------------ +/* + This file is part of rippled: https://github.com/ripple/rippled + Copyright (c) 2012, 2013 Ripple Labs Inc. + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +*/ +//============================================================================== + +// Copyright (c) 2009-2010 Satoshi Nakamoto +// Copyright (c) 2011 The Bitcoin developers +// Distributed under the MIT/X11 software license, see the accompanying +// file license.txt or http://www.opensource.org/licenses/mit-license.php. + +#ifndef RIPPLE_PROTOCOL_BASE_UINT_H_INCLUDED +#define RIPPLE_PROTOCOL_BASE_UINT_H_INCLUDED + +#include +#include +#include + +#include +#include + +#include + +#include + +using beast::zero; +using beast::Zero; + +namespace ripple { + +// This class stores its values internally in big-endian form + +template +class base_uint +{ + static_assert ((Bits % 32) == 0, + "The length of a base_uint in bits must be a multiple of 32."); + + static_assert (Bits >= 64, + "The length of a base_uint in bits must be at least 64."); + +protected: + enum { WIDTH = Bits / 32 }; + + // This is really big-endian in byte order. + // We sometimes use unsigned int for speed. + + // NIKB TODO: migrate to std::array + unsigned int pn[WIDTH]; + +public: + //-------------------------------------------------------------------------- + // + // STL Container Interface + // + + static std::size_t const bytes = Bits / 8; + + typedef std::size_t size_type; + typedef std::ptrdiff_t difference_type; + typedef unsigned char value_type; + typedef value_type* pointer; + typedef value_type& reference; + typedef value_type const* const_pointer; + typedef value_type const& const_reference; + typedef pointer iterator; + typedef const_pointer const_iterator; + typedef std::reverse_iterator + reverse_iterator; + typedef std::reverse_iterator + const_reverse_iterator; + + typedef Tag tag_type; + + pointer data() { return reinterpret_cast(pn); } + const_pointer data() const { return reinterpret_cast(pn); } + + iterator begin() { return data(); } + iterator end() { return data()+bytes; } + const_iterator begin() const { return data(); } + const_iterator end() const { return data()+bytes; } + const_iterator cbegin() const { return data(); } + const_iterator cend() const { return data()+bytes; } + + /** Value hashing function. + The seed prevents crafted inputs from causing degenarate parent containers. + */ + typedef beast::hardened_hash <> hasher; + + /** Container equality testing function. */ + class key_equal + { + public: + bool operator() (base_uint const& lhs, base_uint const& rhs) const + { + return lhs == rhs; + } + }; + + //-------------------------------------------------------------------------- + +private: + /** Construct from a raw pointer. + The buffer pointed to by `data` must be at least Bits/8 bytes. + + @note the structure is used to disambiguate this from the std::uint64_t + constructor: something like base_uint(0) is ambiguous. + */ + // NIKB TODO Remove the need for this constructor. + struct VoidHelper {}; + + explicit base_uint (void const* data, VoidHelper) + { + memcpy (&pn [0], data, bytes); + } + +public: + base_uint () { *this = beast::zero; } + + explicit base_uint (Blob const& vch) + { + assert (vch.size () == size ()); + + if (vch.size () == size ()) + memcpy (pn, &vch[0], size ()); + else + *this = beast::zero; + } + + explicit base_uint (std::uint64_t b) + { + *this = b; + } + + // NIKB TODO remove the need for this constructor - have a free function + // to handle the hex string parsing. + explicit base_uint (std::string const& str) + { + SetHex (str); + } + + base_uint (base_uint const& other) = default; + + template + void copyFrom (base_uint const& other) + { + memcpy (&pn [0], other.data(), bytes); + } + + /* Construct from a raw pointer. + The buffer pointed to by `data` must be at least Bits/8 bytes. + */ + static base_uint + fromVoid (void const* data) + { + return base_uint (data, VoidHelper ()); + } + + int signum() const + { + for (int i = 0; i < WIDTH; i++) + if (pn[i] != 0) + return 1; + + return 0; + } + + bool operator! () const + { + return *this == beast::zero; + } + + const base_uint operator~ () const + { + base_uint ret; + + for (int i = 0; i < WIDTH; i++) + ret.pn[i] = ~pn[i]; + + return ret; + } + + base_uint& operator= (const base_uint& b) + { + for (int i = 0; i < WIDTH; i++) + pn[i] = b.pn[i]; + + return *this; + } + + base_uint& operator= (std::uint64_t uHost) + { + *this = beast::zero; + + // Put in least significant bits. + ((std::uint64_t*) end ())[-1] = htobe64 (uHost); + + return *this; + } + + base_uint& operator^= (const base_uint& b) + { + for (int i = 0; i < WIDTH; i++) + pn[i] ^= b.pn[i]; + + return *this; + } + + base_uint& operator&= (const base_uint& b) + { + for (int i = 0; i < WIDTH; i++) + pn[i] &= b.pn[i]; + + return *this; + } + + base_uint& operator|= (const base_uint& b) + { + for (int i = 0; i < WIDTH; i++) + pn[i] |= b.pn[i]; + + return *this; + } + + base_uint& operator++ () + { + // prefix operator + for (int i = WIDTH - 1; i >= 0; --i) + { + pn[i] = htobe32 (be32toh (pn[i]) + 1); + + if (pn[i] != 0) + break; + } + + return *this; + } + + const base_uint operator++ (int) + { + // postfix operator + const base_uint ret = *this; + ++ (*this); + + return ret; + } + + base_uint& operator-- () + { + for (int i = WIDTH - 1; i >= 0; --i) + { + std::uint32_t prev = pn[i]; + pn[i] = htobe32 (be32toh (pn[i]) - 1); + + if (prev != 0) + break; + } + + return *this; + } + + const base_uint operator-- (int) + { + // postfix operator + const base_uint ret = *this; + -- (*this); + + return ret; + } + + base_uint& operator+= (const base_uint& b) + { + std::uint64_t carry = 0; + + for (int i = WIDTH; i--;) + { + std::uint64_t n = carry + be32toh (pn[i]) + be32toh (b.pn[i]); + + pn[i] = htobe32 (n & 0xffffffff); + carry = n >> 32; + } + + return *this; + } + + template + friend void hash_append(Hasher& h, base_uint const& a) noexcept + { + using beast::hash_append; + hash_append (h, a.pn); + } + + bool SetHexExact (const char* psz) + { + // must be precisely the correct number of hex digits + unsigned char* pOut = begin (); + + for (int i = 0; i < sizeof (pn); ++i) + { + auto cHigh = charUnHex(*psz++); + auto cLow = charUnHex(*psz++); + + if (cHigh == -1 || cLow == -1) + return false; + + *pOut++ = (cHigh << 4) | cLow; + } + + assert (*psz == 0); + assert (pOut == end ()); + + return true; + } + + // Allow leading whitespace. + // Allow leading "0x". + // To be valid must be '\0' terminated. + bool SetHex (const char* psz, bool bStrict = false) + { + // skip leading spaces + if (!bStrict) + while (isspace (*psz)) + psz++; + + // skip 0x + if (!bStrict && psz[0] == '0' && tolower (psz[1]) == 'x') + psz += 2; + + const unsigned char* pEnd = reinterpret_cast (psz); + const unsigned char* pBegin = pEnd; + + // Find end. + while (charUnHex(*pEnd) != -1) + pEnd++; + + // Take only last digits of over long string. + if ((unsigned int) (pEnd - pBegin) > 2 * size ()) + pBegin = pEnd - 2 * size (); + + unsigned char* pOut = end () - ((pEnd - pBegin + 1) / 2); + + *this = beast::zero; + + if ((pEnd - pBegin) & 1) + *pOut++ = charUnHex(*pBegin++); + + while (pBegin != pEnd) + { + auto cHigh = charUnHex(*pBegin++); + auto cLow = pBegin == pEnd + ? 0 + : charUnHex(*pBegin++); + + if (cHigh == -1 || cLow == -1) + return false; + + *pOut++ = (cHigh << 4) | cLow; + } + + return !*pEnd; + } + + bool SetHex (std::string const& str, bool bStrict = false) + { + return SetHex (str.c_str (), bStrict); + } + + void SetHexExact (std::string const& str) + { + SetHexExact (str.c_str ()); + } + + unsigned int size () const + { + return sizeof (pn); + } + + base_uint& operator=(Zero) + { + memset (&pn[0], 0, sizeof (pn)); + return *this; + } + + // Deprecated. + bool isZero () const { return *this == beast::zero; } + bool isNonZero () const { return *this != beast::zero; } + void zero () { *this = beast::zero; } +}; + +typedef base_uint<128> uint128; +typedef base_uint<160> uint160; +typedef base_uint<256> uint256; + +template +inline int compare ( + base_uint const& a, base_uint const& b) +{ + auto ret = std::mismatch (a.cbegin (), a.cend (), b.cbegin ()); + + if (ret.first == a.cend ()) + return 0; + + // a > b + if (*ret.first > *ret.second) + return 1; + + // a < b + return -1; +} + +template +inline bool operator< ( + base_uint const& a, base_uint const& b) +{ + return compare (a, b) < 0; +} + +template +inline bool operator<= ( + base_uint const& a, base_uint const& b) +{ + return compare (a, b) <= 0; +} + +template +inline bool operator> ( + base_uint const& a, base_uint const& b) +{ + return compare (a, b) > 0; +} + +template +inline bool operator>= ( + base_uint const& a, base_uint const& b) +{ + return compare (a, b) >= 0; +} + +template +inline bool operator== ( + base_uint const& a, base_uint const& b) +{ + return compare (a, b) == 0; +} + +template +inline bool operator!= ( + base_uint const& a, base_uint const& b) +{ + return compare (a, b) != 0; +} + +//------------------------------------------------------------------------------ +template +inline bool operator== (base_uint const& a, std::uint64_t b) +{ + return a == base_uint(b); +} + +template +inline bool operator!= (base_uint const& a, std::uint64_t b) +{ + return !(a == b); +} + +//------------------------------------------------------------------------------ +template +inline const base_uint operator^ ( + base_uint const& a, base_uint const& b) +{ + return base_uint (a) ^= b; +} + +template +inline const base_uint operator& ( + base_uint const& a, base_uint const& b) +{ + return base_uint (a) &= b; +} + +template +inline const base_uint operator| ( + base_uint const& a, base_uint const& b) +{ + return base_uint (a) |= b; +} + +template +inline const base_uint operator+ ( + base_uint const& a, base_uint const& b) +{ + return base_uint (a) += b; +} + +//------------------------------------------------------------------------------ +template +inline std::string to_string (base_uint const& a) +{ + return strHex (a.begin (), a.size ()); +} + +template +inline std::ostream& operator<< ( + std::ostream& out, base_uint const& u) +{ + return out << to_string (u); +} + +} // rippled + +namespace boost +{ + +template +struct hash> +{ + using argument_type = ripple::base_uint; + + std::size_t + operator()(argument_type const& u) const + { + return beast::hardened_hash<>{}(u); + } +}; + +} // boost + +#endif diff --git a/src/ripple/types/strHex.h b/src/ripple/basics/strHex.h similarity index 96% rename from src/ripple/types/strHex.h rename to src/ripple/basics/strHex.h index 52c92237f8..a8d4776822 100644 --- a/src/ripple/types/strHex.h +++ b/src/ripple/basics/strHex.h @@ -22,8 +22,8 @@ // Distributed under the MIT/X11 software license, see the accompanying // file license.txt or http://www.opensource.org/licenses/mit-license.php. -#ifndef RIPPLE_TYPES_STRHEX_H_INCLUDED -#define RIPPLE_TYPES_STRHEX_H_INCLUDED +#ifndef RIPPLE_BASICS_STRHEX_H_INCLUDED +#define RIPPLE_BASICS_STRHEX_H_INCLUDED namespace ripple { diff --git a/src/ripple/core/Config.h b/src/ripple/core/Config.h index cb31e89bfd..4d5686d0be 100644 --- a/src/ripple/core/Config.h +++ b/src/ripple/core/Config.h @@ -21,9 +21,9 @@ #define RIPPLE_CORE_CONFIG_H_INCLUDED #include -#include +#include #include -#include +#include #include #include #include diff --git a/src/ripple/core/Job.h b/src/ripple/core/Job.h index 89b7163c10..fe2f2bf935 100644 --- a/src/ripple/core/Job.h +++ b/src/ripple/core/Job.h @@ -22,7 +22,6 @@ #include #include -#include namespace ripple { diff --git a/src/ripple/core/impl/Config.cpp b/src/ripple/core/impl/Config.cpp index 40f37532dd..c0afda65c0 100644 --- a/src/ripple/core/impl/Config.cpp +++ b/src/ripple/core/impl/Config.cpp @@ -20,7 +20,8 @@ #include #include #include -#include +#include +#include #include #include #include diff --git a/src/ripple/types/Base58.h b/src/ripple/crypto/Base58.h similarity index 98% rename from src/ripple/types/Base58.h rename to src/ripple/crypto/Base58.h index 47d4bb2b76..6addda90cb 100644 --- a/src/ripple/types/Base58.h +++ b/src/ripple/crypto/Base58.h @@ -29,10 +29,10 @@ // - E-mail usually won't line-break if there's no punctuation to break at. // - Doubleclicking selects the whole number as one word if it's all alphanumeric. // -#ifndef RIPPLE_TYPES_BASE58_H -#define RIPPLE_TYPES_BASE58_H +#ifndef RIPPLE_CRYPTO_BASE58_H +#define RIPPLE_CRYPTO_BASE58_H -#include +#include #include #include #include diff --git a/src/ripple/crypto/Base58Data.h b/src/ripple/crypto/Base58Data.h index 0f9209eb0b..0d1014ce4a 100644 --- a/src/ripple/crypto/Base58Data.h +++ b/src/ripple/crypto/Base58Data.h @@ -32,8 +32,8 @@ #ifndef RIPPLE_CRYPTO_BASE58DATA_H #define RIPPLE_CRYPTO_BASE58DATA_H -#include -#include +#include +#include namespace ripple { diff --git a/src/ripple/crypto/CBigNum.h b/src/ripple/crypto/CBigNum.h index 256a71e81b..b4e508e862 100644 --- a/src/ripple/crypto/CBigNum.h +++ b/src/ripple/crypto/CBigNum.h @@ -25,7 +25,7 @@ #ifndef RIPPLE_CRYPTO_CBIGNUM_H_INCLUDED #define RIPPLE_CRYPTO_CBIGNUM_H_INCLUDED -#include +#include #include namespace ripple { diff --git a/src/ripple/crypto/ECDSA.h b/src/ripple/crypto/ECDSA.h index 54a0ecb3c9..4ef706f434 100644 --- a/src/ripple/crypto/ECDSA.h +++ b/src/ripple/crypto/ECDSA.h @@ -21,8 +21,8 @@ #define RIPPLE_ECDSA_H #include -#include -#include +#include +#include namespace ripple { diff --git a/src/ripple/crypto/ECDSACanonical.h b/src/ripple/crypto/ECDSACanonical.h index 480715d988..012afb27ea 100644 --- a/src/ripple/crypto/ECDSACanonical.h +++ b/src/ripple/crypto/ECDSACanonical.h @@ -20,7 +20,7 @@ #ifndef RIPPLE_CRYPTO_ECDSACANONICAL_H_INCLUDED #define RIPPLE_CRYPTO_ECDSACANONICAL_H_INCLUDED -#include +#include namespace ripple { diff --git a/src/ripple/crypto/ECIES.h b/src/ripple/crypto/ECIES.h index f298938b9a..cadd7f4125 100644 --- a/src/ripple/crypto/ECIES.h +++ b/src/ripple/crypto/ECIES.h @@ -21,7 +21,7 @@ #define RIPPLE_ECIES_H #include -#include +#include namespace ripple { diff --git a/src/ripple/crypto/GenerateDeterministicKey.h b/src/ripple/crypto/GenerateDeterministicKey.h index 65424eaaa4..b01bd28c63 100644 --- a/src/ripple/crypto/GenerateDeterministicKey.h +++ b/src/ripple/crypto/GenerateDeterministicKey.h @@ -26,7 +26,7 @@ #define RIPPLE_CKEYDETERMINISTIC_H #include -#include +#include #include namespace ripple { diff --git a/src/ripple/crypto/ec_key.h b/src/ripple/crypto/ec_key.h index ad1c27fe93..14a448c47f 100644 --- a/src/ripple/crypto/ec_key.h +++ b/src/ripple/crypto/ec_key.h @@ -20,7 +20,7 @@ #ifndef RIPPLE_ECKEY_H #define RIPPLE_ECKEY_H -#include +#include namespace ripple { namespace openssl { diff --git a/src/ripple/types/impl/Base58.cpp b/src/ripple/crypto/impl/Base58.cpp similarity index 99% rename from src/ripple/types/impl/Base58.cpp rename to src/ripple/crypto/impl/Base58.cpp index c14ef15536..b16fc4eb24 100644 --- a/src/ripple/types/impl/Base58.cpp +++ b/src/ripple/crypto/impl/Base58.cpp @@ -17,9 +17,9 @@ */ //============================================================================== +#include #include #include -#include #include #include diff --git a/src/ripple/crypto/impl/GenerateDeterministicKey.cpp b/src/ripple/crypto/impl/GenerateDeterministicKey.cpp index a85d935020..ca7d4fcc7f 100644 --- a/src/ripple/crypto/impl/GenerateDeterministicKey.cpp +++ b/src/ripple/crypto/impl/GenerateDeterministicKey.cpp @@ -18,15 +18,34 @@ //============================================================================== #include - +#include #include -#include +#include #include namespace ripple { using openssl::ec_key; +uint256 +getSHA512Half (void const* data, std::size_t bytes) +{ + uint256 j[2]; + SHA512 (reinterpret_cast(data), bytes, + reinterpret_cast (j)); + return j[0]; +} + +template +void +copy_uint32 (FwdIt out, std::uint32_t v) +{ + *out++ = v >> 24; + *out++ = (v >> 16) & 0xff; + *out++ = (v >> 8) & 0xff; + *out = v & 0xff; +} + // #define EC_DEBUG // Functions to add support for deterministic EC keys @@ -67,19 +86,20 @@ ec_key GenerateRootDeterministicKey (uint128 const& seed) return ec_key::invalid; } + // find non-zero private key less than the curve's order BIGNUM* privKey = nullptr; - int seq = 0; - + std::uint32_t seq = 0; do { - // private key must be non-zero and less than the curve's order - Serializer s ((128 + 32) / 8); - s.add128 (seed); - s.add32 (seq++); - uint256 root = s.getSHA512Half (); - s.secureErase (); + // buf: 0 seed 16 seq 20 + // |<--------------------------------->|<------>| + std::array buf; + std::copy(seed.begin(), seed.end(), buf.begin()); + copy_uint32 (buf.begin() + 16, seq++); + ++seq; + uint256 root = getSHA512Half (buf.data(), buf.size()); + std::fill (buf.begin(), buf.end(), 0); // security erase privKey = BN_bin2bn ((const unsigned char*) &root, sizeof (root), privKey); - if (privKey == nullptr) { EC_KEY_free (pkey); @@ -88,7 +108,7 @@ ec_key GenerateRootDeterministicKey (uint128 const& seed) return ec_key::invalid; } - root.zero (); + root.zero(); // security erase } while (BN_is_zero (privKey) || (BN_cmp (privKey, order) >= 0)); @@ -188,17 +208,20 @@ static BIGNUM* makeHash (Blob const& pubGen, int seq, BIGNUM const* order) int subSeq = 0; BIGNUM* ret = nullptr; + assert(pubGen.size() == 33); do { - Serializer s ((33 * 8 + 32 + 32) / 8); - s.addRaw (pubGen); - s.add32 (seq); - s.add32 (subSeq++); - uint256 root = s.getSHA512Half (); - s.secureErase (); + // buf: 0 pubGen 33 seq 37 subSeq 41 + // |<--------------------------->|<------>|<-------->| + std::array buf; + std::copy (pubGen.begin(), pubGen.end(), buf.begin()); + copy_uint32 (buf.begin() + 33, seq); + copy_uint32 (buf.begin() + 37, subSeq++); + uint256 root = getSHA512Half (buf.data(), buf.size()); + std::fill(buf.begin(), buf.end(), 0); // security erase ret = BN_bin2bn ((const unsigned char*) &root, sizeof (root), ret); - if (!ret) return nullptr; + root.zero(); // security erase } while (BN_is_zero (ret) || (BN_cmp (ret, order) >= 0)); diff --git a/src/ripple/crypto/tests/CKey.test.cpp b/src/ripple/crypto/tests/CKey.test.cpp index 5809685d8b..5abd654a29 100644 --- a/src/ripple/crypto/tests/CKey.test.cpp +++ b/src/ripple/crypto/tests/CKey.test.cpp @@ -18,8 +18,7 @@ //============================================================================== #include -#include -#include +#include #include namespace ripple { @@ -51,15 +50,6 @@ public: unexpected (to_string (priv2) != "98BC2EACB26EB021D1A6293C044D88BA2F0B6729A2772DEEBF2E21A263C1740B", "Incorrect private key for generator"); - - RippleAddress nSeed; - nSeed.setSeed (seed1); - - unexpected (nSeed.humanSeed () != "shHM53KPZ87Gwdqarm1bAmPeXg8Tn", - "Incorrect human seed"); - - unexpected (nSeed.humanSeed1751 () != "MAD BODY ACE MINT OKAY HUB WHAT DATA SACK FLAT DANA MATH", - "Incorrect 1751 seed"); } }; diff --git a/src/ripple/json/impl/JsonPropertyStream.cpp b/src/ripple/json/impl/JsonPropertyStream.cpp index 5615c26bc1..631de1f740 100644 --- a/src/ripple/json/impl/JsonPropertyStream.cpp +++ b/src/ripple/json/impl/JsonPropertyStream.cpp @@ -17,6 +17,8 @@ */ //============================================================================== +#include + namespace ripple { JsonPropertyStream::JsonPropertyStream () diff --git a/src/ripple/json/impl/json_reader.cpp b/src/ripple/json/impl/json_reader.cpp index c40c9e5cc0..abdf5e2cea 100644 --- a/src/ripple/json/impl/json_reader.cpp +++ b/src/ripple/json/impl/json_reader.cpp @@ -17,6 +17,8 @@ */ //============================================================================== +#include + namespace Json { diff --git a/src/ripple/net/InfoSub.h b/src/ripple/net/InfoSub.h index cb3104095b..c8cc481619 100644 --- a/src/ripple/net/InfoSub.h +++ b/src/ripple/net/InfoSub.h @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/ripple/net/impl/RPCCall.cpp b/src/ripple/net/impl/RPCCall.cpp index 611212f203..080b4bef68 100644 --- a/src/ripple/net/impl/RPCCall.cpp +++ b/src/ripple/net/impl/RPCCall.cpp @@ -17,8 +17,10 @@ */ //============================================================================== +#include +#include #include -#include +#include #include #include #include diff --git a/src/ripple/overlay/Peer.h b/src/ripple/overlay/Peer.h index c4db1a625f..3dd7b2a2fa 100644 --- a/src/ripple/overlay/Peer.h +++ b/src/ripple/overlay/Peer.h @@ -21,11 +21,9 @@ #define RIPPLE_OVERLAY_PEER_H_INCLUDED #include - -#include -#include +#include +#include #include - #include namespace ripple { diff --git a/src/ripple/overlay/impl/ConnectAttempt.cpp b/src/ripple/overlay/impl/ConnectAttempt.cpp index 0dce0f01db..833655a1a9 100644 --- a/src/ripple/overlay/impl/ConnectAttempt.cpp +++ b/src/ripple/overlay/impl/ConnectAttempt.cpp @@ -19,7 +19,8 @@ #include #include - +#include + namespace ripple { ConnectAttempt::ConnectAttempt (boost::asio::io_service& io_service, diff --git a/src/ripple/peerfinder/Slot.h b/src/ripple/peerfinder/Slot.h index fb30615ae3..cc19f26ddb 100644 --- a/src/ripple/peerfinder/Slot.h +++ b/src/ripple/peerfinder/Slot.h @@ -20,7 +20,7 @@ #ifndef RIPPLE_PEERFINDER_SLOT_H_INCLUDED #define RIPPLE_PEERFINDER_SLOT_H_INCLUDED -#include +#include #include #include #include diff --git a/src/ripple/types/Blob.h b/src/ripple/protocol/Blob.h similarity index 100% rename from src/ripple/types/Blob.h rename to src/ripple/protocol/Blob.h diff --git a/src/ripple/types/Book.h b/src/ripple/protocol/Book.h similarity index 98% rename from src/ripple/types/Book.h rename to src/ripple/protocol/Book.h index 09b6b9b18b..3a095c4f14 100644 --- a/src/ripple/types/Book.h +++ b/src/ripple/protocol/Book.h @@ -17,10 +17,10 @@ */ //============================================================================== -#ifndef RIPPLE_TYPES_BOOK_H_INCLUDED -#define RIPPLE_TYPES_BOOK_H_INCLUDED +#ifndef RIPPLE_PROTOCOL_BOOK_H_INCLUDED +#define RIPPLE_PROTOCOL_BOOK_H_INCLUDED -#include +#include #include namespace ripple { diff --git a/src/ripple/rpc/ErrorCodes.h b/src/ripple/protocol/ErrorCodes.h similarity index 97% rename from src/ripple/rpc/ErrorCodes.h rename to src/ripple/protocol/ErrorCodes.h index d39388b27f..0b0265826b 100644 --- a/src/ripple/rpc/ErrorCodes.h +++ b/src/ripple/protocol/ErrorCodes.h @@ -17,11 +17,11 @@ */ //============================================================================== -#ifndef RIPPLE_RPC_ERRORCODES_H_INCLUDED -#define RIPPLE_RPC_ERRORCODES_H_INCLUDED +#ifndef RIPPLE_PROTOCOL_ERRORCODES_H_INCLUDED +#define RIPPLE_PROTOCOL_ERRORCODES_H_INCLUDED #include -#include +#include namespace ripple { diff --git a/src/ripple/protocol/Indexes.h b/src/ripple/protocol/Indexes.h index 6082f9d817..cae3fcfdd4 100644 --- a/src/ripple/protocol/Indexes.h +++ b/src/ripple/protocol/Indexes.h @@ -24,8 +24,8 @@ #include #include #include -#include -#include +#include +#include namespace ripple { diff --git a/src/ripple/types/Issue.h b/src/ripple/protocol/Issue.h similarity index 98% rename from src/ripple/types/Issue.h rename to src/ripple/protocol/Issue.h index 2d8e1802e5..b7631daf92 100644 --- a/src/ripple/types/Issue.h +++ b/src/ripple/protocol/Issue.h @@ -17,8 +17,8 @@ */ //============================================================================== -#ifndef RIPPLE_TYPES_ISSUE_INCLUDED -#define RIPPLE_TYPES_ISSUE_INCLUDED +#ifndef RIPPLE_PROTOCOL_ISSUE_INCLUDED +#define RIPPLE_PROTOCOL_ISSUE_INCLUDED #include #include diff --git a/src/ripple/protocol/JsonFields.h b/src/ripple/protocol/JsonFields.h index e0cbc4216d..c586c1de4c 100644 --- a/src/ripple/protocol/JsonFields.h +++ b/src/ripple/protocol/JsonFields.h @@ -20,6 +20,8 @@ #ifndef RIPPLE_PROTOCOL_JSONFIELDS_H_INCLUDED #define RIPPLE_PROTOCOL_JSONFIELDS_H_INCLUDED +#include + namespace ripple { namespace jss { diff --git a/src/ripple/protocol/Protocol.h b/src/ripple/protocol/Protocol.h index eeb1bcbac0..ff15981f33 100644 --- a/src/ripple/protocol/Protocol.h +++ b/src/ripple/protocol/Protocol.h @@ -20,7 +20,7 @@ #ifndef RIPPLE_PROTOCOL_PROTOCOL_H_INCLUDED #define RIPPLE_PROTOCOL_PROTOCOL_H_INCLUDED -#include +#include #include namespace ripple { diff --git a/src/ripple/protocol/RippleAddress.h b/src/ripple/protocol/RippleAddress.h index 08b012e601..4499f3ecc0 100644 --- a/src/ripple/protocol/RippleAddress.h +++ b/src/ripple/protocol/RippleAddress.h @@ -22,8 +22,8 @@ #include #include -#include -#include +#include +#include #include namespace ripple { diff --git a/src/ripple/types/RippleLedgerHash.h b/src/ripple/protocol/RippleLedgerHash.h similarity index 88% rename from src/ripple/types/RippleLedgerHash.h rename to src/ripple/protocol/RippleLedgerHash.h index aaa7e8a0e3..2a7b572834 100644 --- a/src/ripple/types/RippleLedgerHash.h +++ b/src/ripple/protocol/RippleLedgerHash.h @@ -17,10 +17,10 @@ */ //============================================================================== -#ifndef RIPPLE_TYPES_RIPPLELEDGERHASH_H_INCLUDED -#define RIPPLE_TYPES_RIPPLELEDGERHASH_H_INCLUDED +#ifndef RIPPLE_PROTOCOL_RIPPLELEDGERHASH_H_INCLUDED +#define RIPPLE_PROTOCOL_RIPPLELEDGERHASH_H_INCLUDED -#include +#include namespace ripple { diff --git a/src/ripple/types/RipplePublicKey.h b/src/ripple/protocol/RipplePublicKey.h similarity index 95% rename from src/ripple/types/RipplePublicKey.h rename to src/ripple/protocol/RipplePublicKey.h index 3fb42563b1..67749bb607 100644 --- a/src/ripple/types/RipplePublicKey.h +++ b/src/ripple/protocol/RipplePublicKey.h @@ -17,10 +17,10 @@ */ //============================================================================== -#ifndef RIPPLE_TYPES_RIPPLEPUBLICKEY_H_INCLUDED -#define RIPPLE_TYPES_RIPPLEPUBLICKEY_H_INCLUDED +#ifndef RIPPLE_PROTOCOL_RIPPLEPUBLICKEY_H_INCLUDED +#define RIPPLE_PROTOCOL_RIPPLEPUBLICKEY_H_INCLUDED -#include +#include #include #include #include diff --git a/src/ripple/protocol/STAmount.h b/src/ripple/protocol/STAmount.h index b33069a41c..3fc73aebf2 100644 --- a/src/ripple/protocol/STAmount.h +++ b/src/ripple/protocol/STAmount.h @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include // namespace ripple { diff --git a/src/ripple/protocol/Serializer.h b/src/ripple/protocol/Serializer.h index d1bf434474..95770b9b56 100644 --- a/src/ripple/protocol/Serializer.h +++ b/src/ripple/protocol/Serializer.h @@ -22,7 +22,7 @@ #include #include -#include +#include #include #include diff --git a/src/ripple/core/SystemParameters.h b/src/ripple/protocol/SystemParameters.h similarity index 100% rename from src/ripple/core/SystemParameters.h rename to src/ripple/protocol/SystemParameters.h diff --git a/src/ripple/types/UInt160.h b/src/ripple/protocol/UInt160.h similarity index 92% rename from src/ripple/types/UInt160.h rename to src/ripple/protocol/UInt160.h index f32cdaa80c..eb6e327735 100644 --- a/src/ripple/types/UInt160.h +++ b/src/ripple/protocol/UInt160.h @@ -22,11 +22,11 @@ // Distributed under the MIT/X11 software license, see the accompanying // file license.txt or http://www.opensource.org/licenses/mit-license.php. -#ifndef RIPPLE_TYPES_UINT160_H_INCLUDED -#define RIPPLE_TYPES_UINT160_H_INCLUDED +#ifndef RIPPLE_PROTOCOL_UINT160_H_INCLUDED +#define RIPPLE_PROTOCOL_UINT160_H_INCLUDED -#include -#include +#include +#include #include #include diff --git a/src/ripple/protocol/UintTypes.h b/src/ripple/protocol/UintTypes.h index b50b56a8e9..867192a4f2 100644 --- a/src/ripple/protocol/UintTypes.h +++ b/src/ripple/protocol/UintTypes.h @@ -17,11 +17,11 @@ */ //============================================================================== -#ifndef RIPPLE_TYPES_BASICS -#define RIPPLE_TYPES_BASICS +#ifndef RIPPLE_PROTOCOL_BASICS +#define RIPPLE_PROTOCOL_BASICS #include -#include +#include namespace ripple { namespace detail { diff --git a/src/ripple/types/base_uint.h b/src/ripple/protocol/base_uint.h similarity index 98% rename from src/ripple/types/base_uint.h rename to src/ripple/protocol/base_uint.h index 5ad678228a..e217c46584 100644 --- a/src/ripple/types/base_uint.h +++ b/src/ripple/protocol/base_uint.h @@ -22,12 +22,12 @@ // Distributed under the MIT/X11 software license, see the accompanying // file license.txt or http://www.opensource.org/licenses/mit-license.php. -#ifndef RIPPLE_TYPES_BASE_UINT_H_INCLUDED -#define RIPPLE_TYPES_BASE_UINT_H_INCLUDED +#ifndef RIPPLE_BASICS_BASE_UINT_H_INCLUDED +#define RIPPLE_BASICS_BASE_UINT_H_INCLUDED -#include -#include -#include +#include +#include +#include #include #include diff --git a/src/ripple/types/impl/ByteOrder.cpp b/src/ripple/protocol/impl/ByteOrder.cpp similarity index 100% rename from src/ripple/types/impl/ByteOrder.cpp rename to src/ripple/protocol/impl/ByteOrder.cpp diff --git a/src/ripple/rpc/impl/ErrorCodes.cpp b/src/ripple/protocol/impl/ErrorCodes.cpp similarity index 98% rename from src/ripple/rpc/impl/ErrorCodes.cpp rename to src/ripple/protocol/impl/ErrorCodes.cpp index 1ef219fd60..10e1e39235 100644 --- a/src/ripple/rpc/impl/ErrorCodes.cpp +++ b/src/ripple/protocol/impl/ErrorCodes.cpp @@ -17,10 +17,10 @@ */ //============================================================================== +#include +#include #include -#include - namespace std { template <> @@ -41,7 +41,7 @@ namespace detail { class ErrorCategory { public: - typedef hash_map Map; + using Map = std::unordered_map ; ErrorCategory () : m_unknown (rpcUNKNOWN, "unknown", "An unknown error code.") diff --git a/src/ripple/types/impl/Issue.cpp b/src/ripple/protocol/impl/Issue.cpp similarity index 99% rename from src/ripple/types/impl/Issue.cpp rename to src/ripple/protocol/impl/Issue.cpp index 3359a72d64..f61cc79cf1 100644 --- a/src/ripple/types/impl/Issue.cpp +++ b/src/ripple/protocol/impl/Issue.cpp @@ -18,8 +18,8 @@ //============================================================================== #include -#include -#include +#include +#include #include #include #include diff --git a/src/ripple/protocol/impl/RippleAddress.cpp b/src/ripple/protocol/impl/RippleAddress.cpp index bb9f145232..ee72384747 100644 --- a/src/ripple/protocol/impl/RippleAddress.cpp +++ b/src/ripple/protocol/impl/RippleAddress.cpp @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include #include @@ -957,6 +957,17 @@ public: = naAccountPrivate1.accountPrivateDecrypt (naAccountPublic0, vucTextCipher); expect (vucTextSrc == vucTextRecovered, "Encrypt-decrypt failed."); + + { + RippleAddress nSeed; + uint128 seed1, seed2; + seed1.SetHex ("71ED064155FFADFA38782C5E0158CB26"); + nSeed.setSeed (seed1); + expect (nSeed.humanSeed() == "shHM53KPZ87Gwdqarm1bAmPeXg8Tn", + "Incorrect human seed"); + expect (nSeed.humanSeed1751() == "MAD BODY ACE MINT OKAY HUB WHAT DATA SACK FLAT DANA MATH", + "Incorrect 1751 seed"); + } } }; diff --git a/src/ripple/protocol/impl/STAmount.cpp b/src/ripple/protocol/impl/STAmount.cpp index cbb79ea179..2403933df7 100644 --- a/src/ripple/protocol/impl/STAmount.cpp +++ b/src/ripple/protocol/impl/STAmount.cpp @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/ripple/protocol/impl/STParsedJSON.cpp b/src/ripple/protocol/impl/STParsedJSON.cpp index 748c9a8491..2595afc8df 100644 --- a/src/ripple/protocol/impl/STParsedJSON.cpp +++ b/src/ripple/protocol/impl/STParsedJSON.cpp @@ -19,7 +19,7 @@ #include #include -#include // VFALCO Questionable dependency +#include #include #include diff --git a/src/ripple/protocol/impl/STValidation.cpp b/src/ripple/protocol/impl/STValidation.cpp index 5080d4670f..d11728615f 100644 --- a/src/ripple/protocol/impl/STValidation.cpp +++ b/src/ripple/protocol/impl/STValidation.cpp @@ -17,7 +17,6 @@ */ //============================================================================== -#include #include #include diff --git a/src/ripple/protocol/impl/UintTypes.cpp b/src/ripple/protocol/impl/UintTypes.cpp index cab2caec55..8c3bb456aa 100644 --- a/src/ripple/protocol/impl/UintTypes.cpp +++ b/src/ripple/protocol/impl/UintTypes.cpp @@ -17,7 +17,7 @@ */ //============================================================================== -#include +#include #include #include diff --git a/src/ripple/types/impl/strHex.cpp b/src/ripple/protocol/impl/strHex.cpp similarity index 100% rename from src/ripple/types/impl/strHex.cpp rename to src/ripple/protocol/impl/strHex.cpp diff --git a/src/ripple/protocol/impl/STAmount.test.cpp b/src/ripple/protocol/tests/STAmount.test.cpp similarity index 100% rename from src/ripple/protocol/impl/STAmount.test.cpp rename to src/ripple/protocol/tests/STAmount.test.cpp diff --git a/src/ripple/rpc/Manager.h b/src/ripple/rpc/Manager.h index 3c823f83f9..9686917374 100644 --- a/src/ripple/rpc/Manager.h +++ b/src/ripple/rpc/Manager.h @@ -21,6 +21,7 @@ #define RIPPLE_RPC_MANAGER_H_INCLUDED #include +#include namespace ripple { namespace RPC { diff --git a/src/ripple/rpc/Request.h b/src/ripple/rpc/Request.h index 3f64aaa293..87493b0e5d 100644 --- a/src/ripple/rpc/Request.h +++ b/src/ripple/rpc/Request.h @@ -22,7 +22,8 @@ #include #include -#include +#include +#include namespace ripple { diff --git a/src/ripple/rpc/Status.h b/src/ripple/rpc/Status.h index ea49166483..cb3fb6c22c 100644 --- a/src/ripple/rpc/Status.h +++ b/src/ripple/rpc/Status.h @@ -21,7 +21,7 @@ #define RIPPLE_STATUS_H #include -#include +#include namespace ripple { namespace RPC { diff --git a/src/ripple/rpc/handlers/Ledger.cpp b/src/ripple/rpc/handlers/Ledger.cpp index 0b8e500ae2..0c351fb7a3 100644 --- a/src/ripple/rpc/handlers/Ledger.cpp +++ b/src/ripple/rpc/handlers/Ledger.cpp @@ -19,7 +19,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/ripple/rpc/impl/Context.h b/src/ripple/rpc/impl/Context.h index 9c04c3e55b..92491ba35b 100644 --- a/src/ripple/rpc/impl/Context.h +++ b/src/ripple/rpc/impl/Context.h @@ -23,7 +23,6 @@ #include #include #include -#include namespace ripple { namespace RPC { diff --git a/src/ripple/rpc/impl/DoPrint.h b/src/ripple/rpc/impl/DoPrint.h index 18201891db..ab23c27eda 100644 --- a/src/ripple/rpc/impl/DoPrint.h +++ b/src/ripple/rpc/impl/DoPrint.h @@ -20,6 +20,8 @@ #ifndef RIPPLE_RPC_PRINT_H_INCLUDED #define RIPPLE_RPC_PRINT_H_INCLUDED +#include + namespace ripple { namespace RPC { diff --git a/src/ripple/rpc/impl/JsonWriter.h b/src/ripple/rpc/impl/JsonWriter.h index a87007546e..d945c70ae1 100644 --- a/src/ripple/rpc/impl/JsonWriter.h +++ b/src/ripple/rpc/impl/JsonWriter.h @@ -21,9 +21,9 @@ #define RIPPLED_RIPPLE_BASICS_TYPES_JSONWRITER_H #include -#include +#include #include -#include +#include namespace ripple { namespace RPC { diff --git a/src/ripple/rpc/impl/RPCHandler.cpp b/src/ripple/rpc/impl/RPCHandler.cpp index 8990412f94..3e8ff72245 100644 --- a/src/ripple/rpc/impl/RPCHandler.cpp +++ b/src/ripple/rpc/impl/RPCHandler.cpp @@ -19,6 +19,7 @@ #include #include +#include #include #include #include diff --git a/src/ripple/rpc/impl/TransactionSign.cpp b/src/ripple/rpc/impl/TransactionSign.cpp index ec1d33bcac..7bb9e67e24 100644 --- a/src/ripple/rpc/impl/TransactionSign.cpp +++ b/src/ripple/rpc/impl/TransactionSign.cpp @@ -19,6 +19,7 @@ #include #include +#include #include #include #include diff --git a/src/ripple/rpc/impl/TransactionSign.h b/src/ripple/rpc/impl/TransactionSign.h index 732a7bb307..847be3b9d8 100644 --- a/src/ripple/rpc/impl/TransactionSign.h +++ b/src/ripple/rpc/impl/TransactionSign.h @@ -20,8 +20,6 @@ #ifndef RIPPLE_RPC_TRANSACTIONSIGN_H_INCLUDED #define RIPPLE_RPC_TRANSACTIONSIGN_H_INCLUDED -#include - namespace ripple { namespace RPC { diff --git a/src/ripple/server/impl/JSONRPCUtil.cpp b/src/ripple/server/impl/JSONRPCUtil.cpp index a730aafc2e..5afb122d71 100644 --- a/src/ripple/server/impl/JSONRPCUtil.cpp +++ b/src/ripple/server/impl/JSONRPCUtil.cpp @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/ripple/server/impl/ServerHandlerImp.cpp b/src/ripple/server/impl/ServerHandlerImp.cpp index ece3cdf278..65d2dbd380 100644 --- a/src/ripple/server/impl/ServerHandlerImp.cpp +++ b/src/ripple/server/impl/ServerHandlerImp.cpp @@ -18,6 +18,7 @@ //============================================================================== #include +#include #include #include #include diff --git a/src/ripple/server/make_ServerHandler.h b/src/ripple/server/make_ServerHandler.h index d1d33e28cb..c1353ede70 100644 --- a/src/ripple/server/make_ServerHandler.h +++ b/src/ripple/server/make_ServerHandler.h @@ -20,18 +20,17 @@ #ifndef RIPPLE_SERVER_MAKE_SERVERHANDLER_H_INCLUDED #define RIPPLE_SERVER_MAKE_SERVERHANDLER_H_INCLUDED -#include -#include -#include +#include +#include #include -#include -#include -#include // +#include #include -#include +#include namespace ripple { +class NetworkOPs; + std::unique_ptr make_ServerHandler (beast::Stoppable& parent, boost::asio::io_service& io_service, JobQueue& jobQueue, NetworkOPs& networkOPs, Resource::Manager& resourceManager); diff --git a/src/ripple/types/README.md b/src/ripple/types/README.md deleted file mode 100644 index 5cddea0624..0000000000 --- a/src/ripple/types/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Types - -Provides various types that are specific to the Ripple payment network. diff --git a/src/ripple/unity/app.cpp b/src/ripple/unity/app.cpp index ad91868128..a01e174e27 100644 --- a/src/ripple/unity/app.cpp +++ b/src/ripple/unity/app.cpp @@ -19,8 +19,8 @@ #include +#include #include -#include #include #include #include diff --git a/src/ripple/unity/crypto.cpp b/src/ripple/unity/crypto.cpp index 00c80f19c1..a63efb8776 100644 --- a/src/ripple/unity/crypto.cpp +++ b/src/ripple/unity/crypto.cpp @@ -23,6 +23,7 @@ #include +#include #include #include #include diff --git a/src/ripple/unity/data.h b/src/ripple/unity/data.h deleted file mode 100644 index 7aced0723e..0000000000 --- a/src/ripple/unity/data.h +++ /dev/null @@ -1,103 +0,0 @@ -//------------------------------------------------------------------------------ -/* - This file is part of rippled: https://github.com/ripple/rippled - Copyright (c) 2012, 2013 Ripple Labs Inc. - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -*/ -//============================================================================== - -#ifndef RIPPLE_DATA_H_INCLUDED -#define RIPPLE_DATA_H_INCLUDED - -#include -#include -#include - -struct bignum_st; -typedef struct bignum_st BIGNUM; - -#include -#include -#include -#include -#include -#include -#include -#include // needs CKey -#include -#include // needs Serializer, TER -#include -#include -#include // needs SOTemplate from SerializedObjectTemplate -#include -#include -#include -#include - -#include - -//------------------------------------------------------------------------------ - -namespace boost -{ - template <> - struct range_mutable_iterator - { - typedef std::vector ::iterator type; - }; - - template <> - struct range_const_iterator - { - typedef std::vector ::const_iterator type; - }; - - template <> - struct range_mutable_iterator - { - typedef std::vector ::iterator type; - }; - - template <> - struct range_const_iterator - { - typedef std::vector ::const_iterator type; - }; - - template <> - struct range_mutable_iterator - { - typedef ripple::STObject::iterator type; - }; - - template <> - struct range_const_iterator - { - typedef ripple::STObject::const_iterator type; - }; - - template <> - struct range_mutable_iterator - { - typedef ripple::STArray::iterator type; - }; - - template <> - struct range_const_iterator - { - typedef ripple::STArray::const_iterator type; - }; -} - -#endif diff --git a/src/ripple/unity/json.cpp b/src/ripple/unity/json.cpp index 66edf3c1da..3f7fa91201 100644 --- a/src/ripple/unity/json.cpp +++ b/src/ripple/unity/json.cpp @@ -34,8 +34,6 @@ #include #endif -#include - #define JSON_ASSERT_UNREACHABLE assert( false ) #define JSON_ASSERT( condition ) assert( condition ); // @todo <= change this into an exception throw #define JSON_ASSERT_MESSAGE( condition, message ) if (!( condition )) throw std::runtime_error( message ); diff --git a/src/ripple/unity/json.h b/src/ripple/unity/json.h deleted file mode 100644 index e2f4e99f12..0000000000 --- a/src/ripple/unity/json.h +++ /dev/null @@ -1,53 +0,0 @@ -//------------------------------------------------------------------------------ -/* - This file is part of rippled: https://github.com/ripple/rippled - Copyright (c) 2012, 2013 Ripple Labs Inc. - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -*/ -//============================================================================== - -#ifndef RIPPLE_JSON_H_INCLUDED -#define RIPPLE_JSON_H_INCLUDED - -#include - -#include -#include - -#include -#include -#include - -// For json/ -// -// VFALCO TODO Clean up these one-offs -#include // Needed before these cpptl includes -#ifndef JSON_USE_CPPTL_SMALLMAP -#include -#else -#include -#endif -#ifdef JSON_USE_CPPTL -#include -#endif - -#include -#include -#include -#include -#include - -#include - -#endif diff --git a/src/ripple/unity/protocol.cpp b/src/ripple/unity/protocol.cpp index fac07dec20..2d59ebdb57 100644 --- a/src/ripple/unity/protocol.cpp +++ b/src/ripple/unity/protocol.cpp @@ -24,13 +24,17 @@ #endif #include -#include +#include +#include #include #include +#include #include #include #include +#include #include +#include #include #include #include @@ -49,5 +53,4 @@ #include #include -// VFALCO Should be in a tests dir -#include +#include diff --git a/src/ripple/unity/rpcx.cpp b/src/ripple/unity/rpcx.cpp index f32d92bad2..fb99addb35 100644 --- a/src/ripple/unity/rpcx.cpp +++ b/src/ripple/unity/rpcx.cpp @@ -21,17 +21,11 @@ // Unfortunate but necessary since RPC handlers can literally do anything #include -#include #include -#include - #include -#include -#include #include -#include #include #include #include diff --git a/src/ripple/unity/sslutil.h b/src/ripple/unity/sslutil.h deleted file mode 100644 index 194110e81c..0000000000 --- a/src/ripple/unity/sslutil.h +++ /dev/null @@ -1,35 +0,0 @@ -//------------------------------------------------------------------------------ -/* - This file is part of rippled: https://github.com/ripple/rippled - Copyright (c) 2012, 2013 Ripple Labs Inc. - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -*/ -//============================================================================== - -#ifndef RIPPLE_SSLUTIL_H_INCLUDED -#define RIPPLE_SSLUTIL_H_INCLUDED - -#include - -#include -#include -#include -#include - -#include -#include -#include -#include - -#endif diff --git a/src/ripple/unity/types.cpp b/src/ripple/unity/types.cpp deleted file mode 100644 index d7a553b398..0000000000 --- a/src/ripple/unity/types.cpp +++ /dev/null @@ -1,25 +0,0 @@ -//------------------------------------------------------------------------------ -/* - This file is part of rippled: https://github.com/ripple/rippled - Copyright (c) 2012, 2013 Ripple Labs Inc. - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -*/ -//============================================================================== - -#include - -#include -#include -#include -#include diff --git a/src/ripple/validators/Manager.h b/src/ripple/validators/Manager.h index 7ddaf03b40..768e817a25 100644 --- a/src/ripple/validators/Manager.h +++ b/src/ripple/validators/Manager.h @@ -22,7 +22,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/ripple/validators/impl/Logic.h b/src/ripple/validators/impl/Logic.h index b23be4b8a2..fff091ce91 100644 --- a/src/ripple/validators/impl/Logic.h +++ b/src/ripple/validators/impl/Logic.h @@ -22,7 +22,7 @@ #include #include -#include +#include #include #include #include