mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-19 02:25:52 +00:00
Compare commits
161 Commits
0.30.0-hf2
...
0.30.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c717006c44 | ||
|
|
fd33d693c4 | ||
|
|
31ecb4dcf3 | ||
|
|
5a4e900a21 | ||
|
|
5062e65277 | ||
|
|
bd44880d5a | ||
|
|
5f4fe9fccb | ||
|
|
db9885e1fc | ||
|
|
bdfb5fa2bc | ||
|
|
b2c9179100 | ||
|
|
ff6c9e329f | ||
|
|
f997384fca | ||
|
|
edbd3794e0 | ||
|
|
1f90b177a1 | ||
|
|
a064fcd8e5 | ||
|
|
457ad333b2 | ||
|
|
034e99562f | ||
|
|
b4d2f66d43 | ||
|
|
32fcf28e1f | ||
|
|
5fce652890 | ||
|
|
7728f69100 | ||
|
|
e78b8e4cf3 | ||
|
|
2c9c3f4b6e | ||
|
|
1e1aa76139 | ||
|
|
39b95903e3 | ||
|
|
1bce85d7b6 | ||
|
|
a5583de6e6 | ||
|
|
48e0466a2b | ||
|
|
1320898fbe | ||
|
|
90466d6cde | ||
|
|
889afd0cbd | ||
|
|
0141aadf3e | ||
|
|
0d6ad47051 | ||
|
|
035b308d7c | ||
|
|
81a03285ec | ||
|
|
cb280b10c1 | ||
|
|
4f40e94c99 | ||
|
|
bb944466f2 | ||
|
|
2a97bd3848 | ||
|
|
e91f18946e | ||
|
|
6fd11db5a9 | ||
|
|
5185fa3a92 | ||
|
|
f26835e507 | ||
|
|
d17c8e235f | ||
|
|
754dea8d47 | ||
|
|
3fa2028eb2 | ||
|
|
d5c14755ce | ||
|
|
e86ff5daa1 | ||
|
|
bacf2605a4 | ||
|
|
382c9c68b8 | ||
|
|
bdd733bc0b | ||
|
|
05ac32064f | ||
|
|
bbe7457049 | ||
|
|
48ed44d117 | ||
|
|
0dbacedb58 | ||
|
|
493752e1c6 | ||
|
|
25fe66bafc | ||
|
|
496fea5995 | ||
|
|
810175ae95 | ||
|
|
45b07ff9ec | ||
|
|
469d5494ea | ||
|
|
e19e6c6b0a | ||
|
|
f6f4452231 | ||
|
|
a8cdd4f66d | ||
|
|
999701e384 | ||
|
|
4626992474 | ||
|
|
6066c254c8 | ||
|
|
f2dfde3ee1 | ||
|
|
2401b44bed | ||
|
|
3e5ec91977 | ||
|
|
108906cb20 | ||
|
|
880f354b90 | ||
|
|
0633ef1ba1 | ||
|
|
298ef4ac4d | ||
|
|
01c9baf8ca | ||
|
|
3c496b07f9 | ||
|
|
9f96d7ea38 | ||
|
|
d9905ec719 | ||
|
|
3a039fff66 | ||
|
|
c726377012 | ||
|
|
1601f6bbc9 | ||
|
|
b87eff2115 | ||
|
|
9c8204f945 | ||
|
|
289bc7deb3 | ||
|
|
f72b14ec36 | ||
|
|
f63867e958 | ||
|
|
fa05ded88e | ||
|
|
7bb4ff901e | ||
|
|
03516a14da | ||
|
|
0c67364e6c | ||
|
|
f00c09d9fc | ||
|
|
21a7b62c2b | ||
|
|
49c4a063c1 | ||
|
|
f8edc203e7 | ||
|
|
9a6a064307 | ||
|
|
22678b5cfa | ||
|
|
269008b311 | ||
|
|
0458d1910e | ||
|
|
98bdb9de68 | ||
|
|
124ea41d85 | ||
|
|
818130a8c0 | ||
|
|
41ff751cd2 | ||
|
|
a8cc9033b4 | ||
|
|
fdd012c420 | ||
|
|
b71ff4cb88 | ||
|
|
ca17adf7ec | ||
|
|
323164877c | ||
|
|
6dbbb7406c | ||
|
|
75bed5efcf | ||
|
|
45f00362db | ||
|
|
ded2a5c076 | ||
|
|
b6cb981a8b | ||
|
|
d0770cdb1a | ||
|
|
6464d1abc1 | ||
|
|
7d0d89faae | ||
|
|
9329aafe53 | ||
|
|
dc1276efa3 | ||
|
|
5707988155 | ||
|
|
382adcc93c | ||
|
|
656a6c5eb5 | ||
|
|
6700e44793 | ||
|
|
d6df73747f | ||
|
|
d8f265e8ac | ||
|
|
d67d8c2ced | ||
|
|
4568c38597 | ||
|
|
e636669850 | ||
|
|
7149765892 | ||
|
|
c28c516b22 | ||
|
|
780a553662 | ||
|
|
c755a7ff9b | ||
|
|
8296d81edf | ||
|
|
0622e4fd44 | ||
|
|
3e8e2c2fee | ||
|
|
8296041f9e | ||
|
|
43a480f02d | ||
|
|
9154cbf8e1 | ||
|
|
66b55f91ba | ||
|
|
fe89c74e3b | ||
|
|
61e5359231 | ||
|
|
5ee94f8928 | ||
|
|
caa4ed31de | ||
|
|
570bb2e139 | ||
|
|
b7c3b96516 | ||
|
|
0e7c8ce554 | ||
|
|
97feec6b5e | ||
|
|
9b80081122 | ||
|
|
ad8e9a76ed | ||
|
|
20f186d855 | ||
|
|
3af0c38315 | ||
|
|
6db0ceaf81 | ||
|
|
6f81d2e45d | ||
|
|
442ad4e445 | ||
|
|
9315d98aa9 | ||
|
|
19903674af | ||
|
|
434a63fa07 | ||
|
|
b44d68ea5d | ||
|
|
f424ae6942 | ||
|
|
333ba69d60 | ||
|
|
5b6cc3b036 | ||
|
|
8b8334af86 | ||
|
|
84c0ae1c6d |
27
.travis.yml
27
.travis.yml
@@ -10,7 +10,6 @@ env:
|
||||
# to boost's .tar.gz.
|
||||
- BOOST_ROOT=$HOME/boost_1_59_0
|
||||
- BOOST_URL='http://downloads.sourceforge.net/project/boost/boost/1.59.0/boost_1_59_0.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fboost%2Ffiles%2Fboost%2F1.59.0%2Fboost_1_59_0.tar.gz%2Fdownload&ts=1441761349&use_mirror=skylineservers'
|
||||
- RIPPLED_OLD_GCC_ABI=1
|
||||
|
||||
|
||||
packages: &gcc5_pkgs
|
||||
@@ -25,9 +24,9 @@ packages: &gcc5_pkgs
|
||||
# Provides a backtrace if the unittests crash
|
||||
- gdb
|
||||
|
||||
packages: &gcc48_pkgs
|
||||
- gcc-4.8
|
||||
- g++-4.8
|
||||
packages: &clang36_pkgs
|
||||
- clang-3.6
|
||||
- g++-5
|
||||
- python-software-properties
|
||||
- protobuf-compiler
|
||||
- libprotobuf-dev
|
||||
@@ -51,23 +50,15 @@ matrix:
|
||||
addons: *ao_gcc5
|
||||
|
||||
- compiler: clang
|
||||
env: GCC_VER=4.8 TARGET=debug
|
||||
addons: &ao_gcc48
|
||||
env: GCC_VER=5 TARGET=debug CLANG_VER=3.6
|
||||
addons: &ao_clang36
|
||||
apt:
|
||||
sources: ['ubuntu-toolchain-r-test']
|
||||
packages: *gcc48_pkgs
|
||||
sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-precise-3.6']
|
||||
packages: *clang36_pkgs
|
||||
|
||||
- compiler: clang
|
||||
env: GCC_VER=4.8 TARGET=debug.nounity
|
||||
addons: *ao_gcc48
|
||||
|
||||
- compiler: gcc
|
||||
env: GCC_VER=4.8 TARGET=debug
|
||||
addons: *ao_gcc48
|
||||
|
||||
- compiler: gcc
|
||||
env: GCC_VER=4.8 TARGET=debug.nounity
|
||||
addons: *ao_gcc48
|
||||
env: GCC_VER=5 TARGET=debug.nounity CLANG_VER=3.6
|
||||
addons: *ao_clang36
|
||||
|
||||
cache:
|
||||
directories:
|
||||
|
||||
22
Builds/Fedora/install_rippled_depends_fedora.sh
Executable file
22
Builds/Fedora/install_rippled_depends_fedora.sh
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
#
|
||||
# This scripts installs the dependencies needed by rippled. It should be run
|
||||
# with sudo.
|
||||
#
|
||||
|
||||
if [ ! -f /etc/fedora-release ]; then
|
||||
echo "This script is meant to be run on fedora"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
fedora_release=$(grep -o '[0-9]*' /etc/fedora-release)
|
||||
|
||||
if (( $(bc <<< "${fedora_release} < 22") )); then
|
||||
echo "This script is meant to run on fedora 22 or greater"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
yum -y update
|
||||
yum -y group install "Development Tools"
|
||||
yum -y install gcc-c++ scons openssl-devel openssl-static protobuf-devel protobuf-static boost-devel boost-static libstdc++-static
|
||||
39
Builds/Ubuntu/install_boost.sh
Executable file
39
Builds/Ubuntu/install_boost.sh
Executable file
@@ -0,0 +1,39 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
#
|
||||
# This script builds boost with the correct ABI flags for ubuntu
|
||||
#
|
||||
|
||||
version=59
|
||||
patch=0
|
||||
|
||||
if hash lsb_release 2>/dev/null; then
|
||||
if [ $(lsb_release -si) == "Ubuntu" ]; then
|
||||
ubuntu_release=$(lsb_release -sr)
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "${ubuntu_release}" ]; then
|
||||
echo "System not supported"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
extra_defines=""
|
||||
if (( $(bc <<< "${ubuntu_release} < 15.1") )); then
|
||||
extra_defines="define=_GLIBCXX_USE_CXX11_ABI=0"
|
||||
fi
|
||||
num_procs=$(lscpu -p | grep -v '^#' | sort -u -t, -k 2,4 | wc -l) # pysical cores
|
||||
printf "\nBuild command will be: ./b2 -j${num_procs} ${extra_defines}\n\n"
|
||||
|
||||
boost_dir="boost_1_${version}_${patch}"
|
||||
boost_tag="boost-1.${version}.${patch}"
|
||||
git clone -b "${boost_tag}" --recursive https://github.com/boostorg/boost.git "${boost_dir}"
|
||||
|
||||
cd ${boost_dir}
|
||||
git checkout --force ${boost_tag}
|
||||
git submodule foreach git checkout --force ${boost_tag}
|
||||
./bootstrap.sh
|
||||
./b2 headers
|
||||
./b2 -j${num_procs} ${extra_defines}
|
||||
echo "Build command was: ./b2 -j${num_procs} ${extra_defines}"
|
||||
echo "Don't forget to set BOOST_ROOT!"
|
||||
55
Builds/Ubuntu/install_rippled_depends_ubuntu.sh
Executable file
55
Builds/Ubuntu/install_rippled_depends_ubuntu.sh
Executable file
@@ -0,0 +1,55 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
#
|
||||
# This scripts installs the dependencies needed by rippled. It should be run
|
||||
# with sudo. For ubuntu < 15.10, it installs gcc 5 as the default compiler. gcc
|
||||
# 5 is ABI incompatable with gcc 4. If needed, the following will switch back to
|
||||
# gcc-4: `sudo update-alternatives --config gcc` and choosing the gcc-4
|
||||
# option.
|
||||
#
|
||||
|
||||
if hash lsb_release 2>/dev/null; then
|
||||
if [ $(lsb_release -si) == "Ubuntu" ]; then
|
||||
ubuntu_release=$(lsb_release -sr)
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "${ubuntu_release}" ]; then
|
||||
echo "System not supported"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ${ubuntu_release} == "12.04" ]; then
|
||||
apt-get install python-software-properties
|
||||
add-apt-repository ppa:afrank/boost
|
||||
add-apt-repository ppa:ubuntu-toolchain-r/test
|
||||
apt-get update
|
||||
apt-get -y upgrade
|
||||
apt-get -y install curl git scons ctags pkg-config protobuf-compiler libprotobuf-dev libssl-dev python-software-properties boost1.57-all-dev nodejs g++-5 g++-4.9
|
||||
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 99 --slave /usr/bin/g++ g++ /usr/bin/g++-5
|
||||
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 99 --slave /usr/bin/g++ g++ /usr/bin/g++-4.9
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ ${ubuntu_release} == "14.04" ] || [ ${ubuntu_release} == "15.04" ]; then
|
||||
apt-get install python-software-properties
|
||||
echo "deb [arch=amd64] https://mirrors.ripple.com/ubuntu/ trusty stable contrib" | sudo tee /etc/apt/sources.list.d/ripple.list
|
||||
wget -O- -q https://mirrors.ripple.com/mirrors.ripple.com.gpg.key | sudo apt-key add -
|
||||
add-apt-repository ppa:ubuntu-toolchain-r/test
|
||||
apt-get update
|
||||
apt-get -y upgrade
|
||||
apt-get -y install curl git scons ctags pkg-config protobuf-compiler libprotobuf-dev libssl-dev python-software-properties boost-all-dev nodejs g++-5 g++-4.9
|
||||
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 99 --slave /usr/bin/g++ g++ /usr/bin/g++-5
|
||||
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 99 --slave /usr/bin/g++ g++ /usr/bin/g++-4.9
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ ${ubuntu_release} == "15.10" ]; then
|
||||
apt-get update
|
||||
apt-get -y upgrade
|
||||
apt-get -y install python-software-properties curl git scons ctags pkg-config protobuf-compiler libprotobuf-dev libssl-dev python-software-properties libboost-all-dev nodejs
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "System not supported"
|
||||
exit 1
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
We do not recommend Windows for rippled production use at this time. Currently, the Ubuntu
|
||||
platform has received the highest level of quality assurance, testing, and support.
|
||||
Additionally, 32-bit Windows versions are not supported.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
@@ -11,27 +12,27 @@ To clone the source code repository, create branches for inspection or modificat
|
||||
build rippled under Visual Studio, and run the unit tests you will need these
|
||||
software components:
|
||||
|
||||
* [Visual Studio 2015](https://www.visualstudio.com/)
|
||||
* [Git for Windows](http://git-scm.com/)
|
||||
* [Google Protocol Buffers Compiler](https://code.google.com/p/protobuf/source/checkout)
|
||||
* [Visual Studio 2015](README.md#install-visual-studio-2015)
|
||||
* [Git for Windows](README.md#install-git-for-windows)
|
||||
* [Google Protocol Buffers Compiler](README.md#install-google-protocol-buffers-compiler)
|
||||
* (Optional) [Python and Scons](README.md#optional-install-python-and-scons)
|
||||
* [OpenSSL Library](README.md#install-openssl)
|
||||
* [ActivePerl](https://www.activestate.com/activeperl/downloads)
|
||||
(Recommended to build OpenSSL.)
|
||||
* [Boost 1.59 library](http://www.boost.org/users/download/)
|
||||
* [Node.js](http://nodejs.org/download/)
|
||||
|
||||
Any version of Visual Studio 2015 may be used, including the Visual Studio Community
|
||||
Edition which is available under a free license.
|
||||
* [Boost 1.59 library](README.md#build-boost)
|
||||
* [Node.js](README.md#install-nodejs)
|
||||
|
||||
## Install Software
|
||||
|
||||
### Install Visual Studio 2015
|
||||
|
||||
If not already installed on your system, download your choice of installers from the
|
||||
If not already installed on your system, download your choice of installer from the
|
||||
[Visual Studio 2015 Download](https://www.visualstudio.com/downloads/download-visual-studio-vs)
|
||||
page, run the installer, and follow the directions.
|
||||
The **Visual Studio 2015 Community** edition is available for free, while paid editions
|
||||
may be used for an free initial trial period.
|
||||
page, run the installer, and follow the directions. You may need to choose a "Custom"
|
||||
installation and ensure that "Visual C++" is selected under "Programming Languages".
|
||||
|
||||
Any version of Visual Studio 2015 may be used to build rippled.
|
||||
The **Visual Studio 2015 Community** edition is available free of charge (see
|
||||
[the product page](https://www.visualstudio.com/products/visual-studio-community-vs)
|
||||
for licensing details), while paid editions may be used for an free initial trial period.
|
||||
|
||||
### Install Git for Windows
|
||||
|
||||
@@ -45,7 +46,7 @@ Use of the bash shell under Windows is mandatory for running the unit tests.
|
||||
|
||||
* NOTE: To gain full featured access to the
|
||||
[git-subtree](https://blogs.atlassian.com/2013/05/alternatives-to-git-submodule-git-subtree/)
|
||||
functionality used in the rippled repository we suggest Git version 1.8.3.2 or later.
|
||||
functionality used in the rippled repository we suggest Git version 2.6.2 or later.
|
||||
|
||||
### Install Google Protocol Buffers Compiler
|
||||
|
||||
@@ -61,48 +62,51 @@ precompiled Windows executable from the
|
||||
Either way, once you have the required version of **protoc.exe**, copy it into
|
||||
a folder in your command line `%PATH%`.
|
||||
|
||||
* **NOTE:** If you use an older version of the compiler, the build will fail with
|
||||
errors related to a mismatch of the version of protocol buffer headers versus
|
||||
the compiler.
|
||||
|
||||
### Install ActivePerl
|
||||
* **NOTE:** If you use an older version of the compiler, the build will
|
||||
fail with errors related to a mismatch of the version of protocol
|
||||
buffer headers versus the compiler.
|
||||
|
||||
If not already installed on your system, download your choice of installers from the
|
||||
[Activeperl Download](https://www.activestate.com/activeperl/downloads)
|
||||
page, run the installer, and follow the directions.
|
||||
### (Optional) Install Python and Scons
|
||||
|
||||
[Python](https://www.python.org/downloads/) and
|
||||
[Scons](http://scons.org/download.php) are not required to build
|
||||
rippled with Visual Studio, but can be used to build from the
|
||||
command line and in scripts, and are required to properly update
|
||||
the `RippleD.vcxproj` file.
|
||||
|
||||
If you wish to build with scons, a version after 2.3.5 is required
|
||||
for Visual Studio 2015 support.
|
||||
|
||||
## Configure Dependencies
|
||||
|
||||
### Install OpenSSL
|
||||
|
||||
1. Download OpenSSL *v1.0.2d or higher* source https://www.openssl.org/source/
|
||||
2. Unpack the source archive into a temporary folder.
|
||||
3. Open `cmd.exe`. Change the the folder where you unpacked OpenSSL.
|
||||
4. Build the 64-bit libraries: (
|
||||
[Reference 1](http://developer.covenanteyes.com/building-openssl-for-visual-studio/),
|
||||
[Reference 2](http://www.p-nand-q.com/programming/windows/building_openssl_with_visual_studio_2013.html))
|
||||
[Download OpenSSL.](http://slproweb.com/products/Win32OpenSSL.html)
|
||||
There will be four variants available:
|
||||
|
||||
```powershell
|
||||
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\vcvars32.bat"
|
||||
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\vcvars64.bat"
|
||||
|
||||
perl Configure VC-WIN64A --prefix=C:\lib\openssl-VC-64
|
||||
ms\do_win64a
|
||||
nmake -f ms\nt.mak
|
||||
nmake -f ms\nt.mak install
|
||||
|
||||
copy tmp32\lib.pdb C:\lib\openssl-VC-64\lib\
|
||||
```
|
||||
5. Optionally, delete the temporary folder.
|
||||
1. 64-bit. Use this if you are running 64-bit windows. As of this writing, the link is called: "Win64 OpenSSL v1.0.2d".
|
||||
2. 64-bit light - Don't use this. It is missing files needed to build rippled. As of this writing, the link is called: "Win64 OpenSSL v1.0.2d Light"
|
||||
|
||||
* NOTE: Since rippled links statically to OpenSSL, it does not matter where the OpenSSL
|
||||
.DLL files are placed, or what version they are. rippled does not use or require any
|
||||
external .DLL files to run other than the standard operating system ones.
|
||||
Run the installer, and choose an appropriate location for your OpenSSL
|
||||
installation. In this guide we use **C:\lib\OpenSSL-Win64** as the
|
||||
destination location.
|
||||
|
||||
You may be informed on running the installer that "Visual C++ 2008
|
||||
Redistributables" must first be installed first. If so, download it
|
||||
from the [same page](http://slproweb.com/products/Win32OpenSSL.html),
|
||||
again making sure to get the correct 32-/64-bit variant.
|
||||
|
||||
* NOTE: Since rippled links statically to OpenSSL, it does not matter
|
||||
where the OpenSSL .DLL files are placed, or what version they are.
|
||||
rippled does not use or require any external .DLL files to run
|
||||
other than the standard operating system ones.
|
||||
|
||||
### Build Boost
|
||||
|
||||
After downloading boost and unpacking it, open a **Developer Command Prompt** for
|
||||
Visual Studio, change to the directory containing boost, then bootstrap the build tools:
|
||||
After [downloading boost](http://www.boost.org/users/download/) and
|
||||
unpacking it, open a **Developer Command Prompt** for
|
||||
Visual Studio, change to the directory containing boost, then
|
||||
bootstrap the build tools:
|
||||
|
||||
```powershell
|
||||
cd C:\lib\boost_1_59_0
|
||||
@@ -158,10 +162,9 @@ git checkout master
|
||||
|
||||
Open the solution file located at **Builds/Visual Studio 2015/ripple.sln**
|
||||
and select the "View->Other Windows->Property Manager" to bring up the Property Manager.
|
||||
Expand the *debug | x64* section (or similar section on 32-windows) and
|
||||
Expand the *debug | x64* section and
|
||||
double click the *Microsoft.Cpp.x64.user* property sheet to bring up the
|
||||
*Property Pages* dialog (these sections will be called *Win32* instead of
|
||||
*x64* on 32-bit windows). These are global properties applied to all
|
||||
*Property Pages* dialog. These are global properties applied to all
|
||||
64-bit build targets:
|
||||
|
||||

|
||||
@@ -179,8 +182,8 @@ of building the boost libraries:
|
||||
|
||||
Follow the same procedure for adding the `Additional Include Directories`
|
||||
and `Additional Library Directories` required for OpenSSL. In our example
|
||||
these directories are **C:\lib\openssl-VC-64\include** and
|
||||
**C:\lib\openssl-VC-64\lib** respectively.
|
||||
these directories are **C:\lib\OpenSSL-Win64\include** and
|
||||
**C:\lib\OpenSSL-Win64\lib** respectively.
|
||||
|
||||
# Setup Environment
|
||||
|
||||
@@ -234,11 +237,26 @@ and then choose the **Build->Build Solution** menu item.
|
||||
|
||||
# Unit Tests (Recommended)
|
||||
|
||||
## Internal
|
||||
|
||||
The internal rippled unit tests are written in C++ and are part
|
||||
of the rippled executable.
|
||||
|
||||
From a Windows console, run the unit tests:
|
||||
|
||||
```
|
||||
./build/msvc.debug/rippled.exe --unittest
|
||||
```
|
||||
|
||||
Substitute the correct path to the executable to test different builds.
|
||||
|
||||
## External
|
||||
|
||||
The external rippled unit tests are written in Javascript using Node.js,
|
||||
and utilize the mocha unit test framework. To run the unit tests, it
|
||||
will be necessary to perform the following steps:
|
||||
|
||||
## Install Node.js
|
||||
### Install Node.js
|
||||
|
||||
[Install Node.js](http://nodejs.org/download/). We recommend the Windows
|
||||
installer (**.msi** file) as it takes care of updating the *PATH* environment
|
||||
@@ -246,7 +264,7 @@ variable so that scripts can find the command. On Windows systems,
|
||||
**Node.js** comes with **npm**. A separate installation of **npm**
|
||||
is not necessary.
|
||||
|
||||
## Create node_modules
|
||||
### Create node_modules
|
||||
|
||||
Open a windows console. From the root of your local rippled repository
|
||||
directory, invoke **npm** to bring in the necessary components:
|
||||
@@ -263,7 +281,7 @@ Error: ENOENT, stat 'C:\Users\username\AppData\Roaming\npm'
|
||||
|
||||
simply create the indicated folder and try again.
|
||||
|
||||
## Create a test config.js
|
||||
### Create a test config.js
|
||||
|
||||
From a *bash* shell (installed with Git for Windows), copy the
|
||||
example configuration file into the appropriate location:
|
||||
@@ -284,7 +302,7 @@ exports.default_server_config = {
|
||||
Also in **test/config.js**, change any occurrences of the
|
||||
IP address *0.0.0.0* to *127.0.0.1*.
|
||||
|
||||
## Run Tests
|
||||
### Run Tests
|
||||
|
||||
From a windows console, run the unit tests:
|
||||
|
||||
@@ -303,7 +321,7 @@ node_modules/mocha/bin/mocha test/account_tx-test.js
|
||||
facility is usually slightly behind the develop branch of the
|
||||
authoritative ripple-lib repository. Therefore, some tests might fail.
|
||||
|
||||
## Development ripple-lib
|
||||
### Development ripple-lib
|
||||
|
||||
To use the latest branch of **ripple-lib** during the unit tests,
|
||||
first clone the repository in a new location outside of your rippled
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug.classic|x64'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>HAVE_USLEEP=1;SOCI_CXX_C11=1;_WIN32_WINNT=0x6000;DEBUG;DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;OPENSSL_NO_SSL2;WIN32_CONSOLE;_CRTDBG_MAP_ALLOC;_CRT_SECURE_NO_WARNINGS;_DEBUG;_SCL_SECURE_NO_WARNINGS;_SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>HAVE_USLEEP=1;SOCI_CXX_C11=1;_WIN32_WINNT=0x6000;-DBOOST_NO_AUTO_PTR;DEBUG;DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;OPENSSL_NO_SSL2;WIN32_CONSOLE;_CRTDBG_MAP_ALLOC;_CRT_SECURE_NO_WARNINGS;_DEBUG;_SCL_SECURE_NO_WARNINGS;_SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\build\proto;..\..\src;..\..\src\beast;..\..\src\protobuf\src;..\..\src\protobuf\vsprojects;..\..\src\soci\include;..\..\src\soci\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DisableSpecificWarnings>4800;4244;4267;4018</DisableSpecificWarnings>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
@@ -110,7 +110,7 @@
|
||||
<AdditionalOptions>/bigobj /FS %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>advapi32.lib;comdlg32.lib;gdi32.lib;kernel32.lib;libeay32.lib;odbc32.lib;odbccp32.lib;ole32.lib;oleaut32.lib;shell32.lib;Shlwapi.lib;ssleay32.lib;user32.lib;uuid.lib;winspool.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>advapi32.lib;comdlg32.lib;gdi32.lib;kernel32.lib;legacy_stdio_definitions.lib;odbc32.lib;odbccp32.lib;ole32.lib;oleaut32.lib;shell32.lib;Shlwapi.lib;user32.lib;uuid.lib;VC/static/libeay32MTd.lib;VC/static/ssleay32MTd.lib;winspool.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<SuppressStartupBanner>True</SuppressStartupBanner>
|
||||
<ErrorReporting>NoErrorReport</ErrorReporting>
|
||||
<SubSystem>Console</SubSystem>
|
||||
@@ -123,7 +123,7 @@
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug|x64'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>HAVE_USLEEP=1;SOCI_CXX_C11=1;_WIN32_WINNT=0x6000;DEBUG;DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;OPENSSL_NO_SSL2;WIN32_CONSOLE;_CRTDBG_MAP_ALLOC;_CRT_SECURE_NO_WARNINGS;_DEBUG;_SCL_SECURE_NO_WARNINGS;_SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>HAVE_USLEEP=1;SOCI_CXX_C11=1;_WIN32_WINNT=0x6000;-DBOOST_NO_AUTO_PTR;DEBUG;DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;OPENSSL_NO_SSL2;WIN32_CONSOLE;_CRTDBG_MAP_ALLOC;_CRT_SECURE_NO_WARNINGS;_DEBUG;_SCL_SECURE_NO_WARNINGS;_SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\build\proto;..\..\src;..\..\src\beast;..\..\src\protobuf\src;..\..\src\protobuf\vsprojects;..\..\src\soci\include;..\..\src\soci\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DisableSpecificWarnings>4800;4244;4267;4018</DisableSpecificWarnings>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
@@ -147,7 +147,7 @@
|
||||
<AdditionalOptions>/bigobj /FS %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>advapi32.lib;comdlg32.lib;gdi32.lib;kernel32.lib;libeay32.lib;odbc32.lib;odbccp32.lib;ole32.lib;oleaut32.lib;shell32.lib;Shlwapi.lib;ssleay32.lib;user32.lib;uuid.lib;winspool.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>advapi32.lib;comdlg32.lib;gdi32.lib;kernel32.lib;legacy_stdio_definitions.lib;odbc32.lib;odbccp32.lib;ole32.lib;oleaut32.lib;shell32.lib;Shlwapi.lib;user32.lib;uuid.lib;VC/static/libeay32MTd.lib;VC/static/ssleay32MTd.lib;winspool.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<SuppressStartupBanner>True</SuppressStartupBanner>
|
||||
<ErrorReporting>NoErrorReport</ErrorReporting>
|
||||
<SubSystem>Console</SubSystem>
|
||||
@@ -160,7 +160,7 @@
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release.classic|x64'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>HAVE_USLEEP=1;SOCI_CXX_C11=1;_WIN32_WINNT=0x6000;DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;NDEBUG;OPENSSL_NO_SSL2;WIN32_CONSOLE;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>HAVE_USLEEP=1;SOCI_CXX_C11=1;_WIN32_WINNT=0x6000;-DBOOST_NO_AUTO_PTR;DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;NDEBUG;OPENSSL_NO_SSL2;WIN32_CONSOLE;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\build\proto;..\..\src;..\..\src\beast;..\..\src\protobuf\src;..\..\src\protobuf\vsprojects;..\..\src\soci\include;..\..\src\soci\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DisableSpecificWarnings>4800;4244;4267;4018</DisableSpecificWarnings>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
@@ -182,7 +182,7 @@
|
||||
<AdditionalOptions>/bigobj /FS %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>advapi32.lib;comdlg32.lib;gdi32.lib;kernel32.lib;libeay32.lib;odbc32.lib;odbccp32.lib;ole32.lib;oleaut32.lib;shell32.lib;Shlwapi.lib;ssleay32.lib;user32.lib;uuid.lib;winspool.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>advapi32.lib;comdlg32.lib;gdi32.lib;kernel32.lib;legacy_stdio_definitions.lib;odbc32.lib;odbccp32.lib;ole32.lib;oleaut32.lib;shell32.lib;Shlwapi.lib;user32.lib;uuid.lib;VC/static/libeay32MT.lib;VC/static/ssleay32MT.lib;winspool.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<SuppressStartupBanner>True</SuppressStartupBanner>
|
||||
<ErrorReporting>NoErrorReport</ErrorReporting>
|
||||
<SubSystem>Console</SubSystem>
|
||||
@@ -195,7 +195,7 @@
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release|x64'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>HAVE_USLEEP=1;SOCI_CXX_C11=1;_WIN32_WINNT=0x6000;DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;NDEBUG;OPENSSL_NO_SSL2;WIN32_CONSOLE;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>HAVE_USLEEP=1;SOCI_CXX_C11=1;_WIN32_WINNT=0x6000;-DBOOST_NO_AUTO_PTR;DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;NDEBUG;OPENSSL_NO_SSL2;WIN32_CONSOLE;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\build\proto;..\..\src;..\..\src\beast;..\..\src\protobuf\src;..\..\src\protobuf\vsprojects;..\..\src\soci\include;..\..\src\soci\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DisableSpecificWarnings>4800;4244;4267;4018</DisableSpecificWarnings>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
@@ -217,7 +217,7 @@
|
||||
<AdditionalOptions>/bigobj /FS %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>advapi32.lib;comdlg32.lib;gdi32.lib;kernel32.lib;libeay32.lib;odbc32.lib;odbccp32.lib;ole32.lib;oleaut32.lib;shell32.lib;Shlwapi.lib;ssleay32.lib;user32.lib;uuid.lib;winspool.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>advapi32.lib;comdlg32.lib;gdi32.lib;kernel32.lib;legacy_stdio_definitions.lib;odbc32.lib;odbccp32.lib;ole32.lib;oleaut32.lib;shell32.lib;Shlwapi.lib;user32.lib;uuid.lib;VC/static/libeay32MT.lib;VC/static/ssleay32MT.lib;winspool.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<SuppressStartupBanner>True</SuppressStartupBanner>
|
||||
<ErrorReporting>NoErrorReport</ErrorReporting>
|
||||
<SubSystem>Console</SubSystem>
|
||||
@@ -380,26 +380,8 @@
|
||||
<ClCompile Include="..\..\src\beast\beast\crypto\tests\base64.test.cpp">
|
||||
<ExcludedFromBuild>True</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClInclude Include="..\..\src\beast\beast\cxx14\algorithm.h">
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\beast\beast\cxx14\config.h">
|
||||
</ClInclude>
|
||||
<ClCompile Include="..\..\src\beast\beast\cxx14\cxx14.unity.cpp">
|
||||
<ExcludedFromBuild>True</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClInclude Include="..\..\src\beast\beast\cxx14\functional.h">
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\beast\beast\cxx14\iterator.h">
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\beast\beast\cxx14\memory.h">
|
||||
</ClInclude>
|
||||
<ClCompile Include="..\..\src\beast\beast\cxx14\tests\integer_sequence.test.cpp">
|
||||
<ExcludedFromBuild>True</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClInclude Include="..\..\src\beast\beast\cxx14\type_traits.h">
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\beast\beast\cxx14\utility.h">
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\beast\beast\hash\endian.h">
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\beast\beast\hash\fnv1a.h">
|
||||
@@ -957,8 +939,6 @@
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\beast\beast\threads\semaphore.h">
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\beast\beast\threads\SharedData.h">
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\beast\beast\threads\SharedLockGuard.h">
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\beast\beast\threads\SharedMutexAdapter.h">
|
||||
@@ -1032,12 +1012,8 @@
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\beast\beast\utility\meta.h">
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\beast\beast\utility\noexcept.h">
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\beast\beast\utility\PropertyStream.h">
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\beast\beast\utility\static_initializer.h">
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\beast\beast\utility\tagged_integer.h">
|
||||
</ClInclude>
|
||||
<ClCompile Include="..\..\src\beast\beast\utility\tests\bassert.test.cpp">
|
||||
@@ -1049,9 +1025,6 @@
|
||||
<ClCompile Include="..\..\src\beast\beast\utility\tests\Journal.test.cpp">
|
||||
<ExcludedFromBuild>True</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\beast\beast\utility\tests\static_initializer.test.cpp">
|
||||
<ExcludedFromBuild>True</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\beast\beast\utility\tests\tagged_integer.test.cpp">
|
||||
<ExcludedFromBuild>True</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
@@ -1383,6 +1356,10 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\app\ledger\impl\InboundTransactions.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\app\ledger\impl\LedgerCleaner.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
@@ -1407,14 +1384,30 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\app\ledger\impl\LocalTxs.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\app\ledger\impl\OpenLedger.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\app\ledger\impl\TransactionAcquire.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClInclude Include="..\..\src\ripple\app\ledger\impl\TransactionAcquire.h">
|
||||
</ClInclude>
|
||||
<ClCompile Include="..\..\src\ripple\app\ledger\impl\TransactionMaster.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClInclude Include="..\..\src\ripple\app\ledger\InboundLedger.h">
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\app\ledger\InboundLedgers.h">
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\app\ledger\InboundTransactions.h">
|
||||
</ClInclude>
|
||||
<ClCompile Include="..\..\src\ripple\app\ledger\Ledger.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
@@ -1443,6 +1436,8 @@
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\app\ledger\LedgerToJson.h">
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\app\ledger\LocalTxs.h">
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\app\ledger\OpenLedger.h">
|
||||
</ClInclude>
|
||||
<ClCompile Include="..\..\src\ripple\app\ledger\OrderBookDB.cpp">
|
||||
@@ -1453,6 +1448,8 @@
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\app\ledger\PendingSaves.h">
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\app\ledger\TransactionMaster.h">
|
||||
</ClInclude>
|
||||
<ClCompile Include="..\..\src\ripple\app\ledger\TransactionStateSF.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
@@ -1537,6 +1534,14 @@
|
||||
</ClCompile>
|
||||
<ClInclude Include="..\..\src\ripple\app\misc\impl\AccountTxPaging.h">
|
||||
</ClInclude>
|
||||
<ClCompile Include="..\..\src\ripple\app\misc\impl\Transaction.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\app\misc\impl\TxQ.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\app\misc\NetworkOPs.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
@@ -1553,6 +1558,10 @@
|
||||
</ClCompile>
|
||||
<ClInclude Include="..\..\src\ripple\app\misc\SHAMapStoreImp.h">
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\app\misc\Transaction.h">
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\app\misc\TxQ.h">
|
||||
</ClInclude>
|
||||
<ClCompile Include="..\..\src\ripple\app\misc\UniqueNodeList.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
@@ -1697,6 +1706,10 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\app\tests\HashRouter_test.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\app\tests\MultiSign.test.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
@@ -1733,8 +1746,14 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\app\tests\TxQ_test.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClInclude Include="..\..\src\ripple\app\tx\apply.h">
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\app\tx\applySteps.h">
|
||||
</ClInclude>
|
||||
<ClCompile Include="..\..\src\ripple\app\tx\impl\apply.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
@@ -1745,6 +1764,10 @@
|
||||
</ClCompile>
|
||||
<ClInclude Include="..\..\src\ripple\app\tx\impl\ApplyContext.h">
|
||||
</ClInclude>
|
||||
<ClCompile Include="..\..\src\ripple\app\tx\impl\applySteps.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\app\tx\impl\BookTip.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
@@ -1781,14 +1804,6 @@
|
||||
</ClCompile>
|
||||
<ClInclude Include="..\..\src\ripple\app\tx\impl\CreateTicket.h">
|
||||
</ClInclude>
|
||||
<ClCompile Include="..\..\src\ripple\app\tx\impl\InboundTransactions.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\app\tx\impl\LocalTxs.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClInclude Include="..\..\src\ripple\app\tx\impl\Offer.h">
|
||||
</ClInclude>
|
||||
<ClCompile Include="..\..\src\ripple\app\tx\impl\OfferStream.cpp">
|
||||
@@ -1845,40 +1860,16 @@
|
||||
</ClCompile>
|
||||
<ClInclude Include="..\..\src\ripple\app\tx\impl\Taker.h">
|
||||
</ClInclude>
|
||||
<ClCompile Include="..\..\src\ripple\app\tx\impl\Transaction.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\app\tx\impl\TransactionAcquire.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\app\tx\impl\TransactionMaster.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\app\tx\impl\Transactor.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClInclude Include="..\..\src\ripple\app\tx\impl\Transactor.h">
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\app\tx\InboundTransactions.h">
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\app\tx\LocalTxs.h">
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\app\tx\Transaction.h">
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\app\tx\TransactionAcquire.h">
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\app\tx\TransactionMaster.h">
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\basics\base_uint.h">
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\basics\BasicConfig.h">
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\basics\BasicTypes.h">
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\basics\Blob.h">
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\basics\Buffer.h">
|
||||
@@ -1923,6 +1914,10 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\basics\impl\mulDiv.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\basics\impl\RangeSet.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
@@ -1965,6 +1960,10 @@
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\basics\make_SSLContext.h">
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\basics\mulDiv.h">
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\basics\qalloc.h">
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\basics\RangeSet.h">
|
||||
</ClInclude>
|
||||
<None Include="..\..\src\ripple\basics\README.md">
|
||||
@@ -1989,6 +1988,10 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\basics\tests\contract.test.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\basics\tests\hardened_hash_test.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
@@ -1997,6 +2000,10 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\basics\tests\mulDiv.test.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\basics\tests\RangeSet.test.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
@@ -2095,6 +2102,10 @@
|
||||
</ClCompile>
|
||||
<ClInclude Include="..\..\src\ripple\core\Job.h">
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\core\JobCoro.h">
|
||||
</ClInclude>
|
||||
<None Include="..\..\src\ripple\core\JobCoro.ipp">
|
||||
</None>
|
||||
<ClInclude Include="..\..\src\ripple\core\JobQueue.h">
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\core\JobTypeData.h">
|
||||
@@ -2117,6 +2128,12 @@
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='debug.classic|x64'">..\..\src\soci\src\core;..\..\src\sqlite;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='release.classic|x64'">..\..\src\soci\src\core;..\..\src\sqlite;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\core\tests\Coroutine.test.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='debug.classic|x64'">..\..\src\soci\src\core;..\..\src\sqlite;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='release.classic|x64'">..\..\src\soci\src\core;..\..\src\sqlite;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\core\tests\LoadFeeTrack.test.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
@@ -2297,6 +2314,8 @@
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\ledger\ApplyViewImpl.h">
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\ledger\BookDirs.h">
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\ledger\CachedSLEs.h">
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\ledger\CachedView.h">
|
||||
@@ -2325,6 +2344,10 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\ledger\impl\BookDirs.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\ledger\impl\CachedSLEs.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
@@ -2371,6 +2394,10 @@
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\ledger\Sandbox.h">
|
||||
</ClInclude>
|
||||
<ClCompile Include="..\..\src\ripple\ledger\tests\BookDirs_test.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\ledger\tests\Directory_test.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
@@ -2381,6 +2408,10 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\ledger\tests\PendingSaves_test.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\ledger\tests\SkipList_test.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
@@ -2525,12 +2556,6 @@
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='debug.classic|x64'">..\..\src\rocksdb2\include;..\..\src\snappy\config;..\..\src\snappy\snappy;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='release.classic|x64'">..\..\src\rocksdb2\include;..\..\src\snappy\config;..\..\src\snappy\snappy;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\nodestore\impl\ScopedMetrics.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='debug.classic|x64'">..\..\src\rocksdb2\include;..\..\src\snappy\config;..\..\src\snappy\snappy;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='release.classic|x64'">..\..\src\rocksdb2\include;..\..\src\snappy\config;..\..\src\snappy\snappy;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<ClInclude Include="..\..\src\ripple\nodestore\impl\Tuning.h">
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\nodestore\Manager.h">
|
||||
@@ -2539,8 +2564,6 @@
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\nodestore\Scheduler.h">
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\nodestore\ScopedMetrics.h">
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\nodestore\Task.h">
|
||||
</ClInclude>
|
||||
<ClCompile Include="..\..\src\ripple\nodestore\tests\Backend.test.cpp">
|
||||
@@ -2577,8 +2600,14 @@
|
||||
</ClCompile>
|
||||
<ClInclude Include="..\..\src\ripple\nodestore\Types.h">
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\overlay\ClusterNodeStatus.h">
|
||||
<ClInclude Include="..\..\src\ripple\overlay\Cluster.h">
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\overlay\ClusterNode.h">
|
||||
</ClInclude>
|
||||
<ClCompile Include="..\..\src\ripple\overlay\impl\Cluster.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\overlay\impl\ConnectAttempt.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
@@ -2619,6 +2648,12 @@
|
||||
</ClCompile>
|
||||
<ClInclude Include="..\..\src\ripple\overlay\impl\TMHello.h">
|
||||
</ClInclude>
|
||||
<ClCompile Include="..\..\src\ripple\overlay\impl\TrafficCount.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClInclude Include="..\..\src\ripple\overlay\impl\TrafficCount.h">
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\overlay\impl\Tuning.h">
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\overlay\impl\ZeroCopyStream.h">
|
||||
@@ -2637,6 +2672,10 @@
|
||||
</ClInclude>
|
||||
<None Include="..\..\src\ripple\overlay\README.md">
|
||||
</None>
|
||||
<ClCompile Include="..\..\src\ripple\overlay\tests\cluster_test.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\overlay\tests\manifest_test.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
@@ -2751,6 +2790,10 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\protocol\impl\Book.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\protocol\impl\BuildInfo.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
@@ -2787,6 +2830,10 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\protocol\impl\Issue.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\protocol\impl\Keylet.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
@@ -2989,6 +3036,10 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\protocol\tests\digest_test.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\protocol\tests\InnerObjectFormats.test.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
@@ -3013,6 +3064,10 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\protocol\tests\STAccount.test.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\protocol\tests\STAmount.test.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
@@ -3112,8 +3167,6 @@
|
||||
</ClCompile>
|
||||
<ClInclude Include="..\..\src\ripple\rpc\Context.h">
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rpc\Coroutine.h">
|
||||
</ClInclude>
|
||||
<ClCompile Include="..\..\src\ripple\rpc\handlers\AccountCurrenciesHandler.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
@@ -3170,6 +3223,10 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rpc\handlers\Fee1.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rpc\handlers\FetchInfo.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
@@ -3374,10 +3431,6 @@
|
||||
</ClCompile>
|
||||
<ClInclude Include="..\..\src\ripple\rpc\impl\Accounts.h">
|
||||
</ClInclude>
|
||||
<ClCompile Include="..\..\src\ripple\rpc\impl\Coroutine.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rpc\impl\GetAccountObjects.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
@@ -3440,10 +3493,6 @@
|
||||
</ClCompile>
|
||||
<ClInclude Include="..\..\src\ripple\rpc\impl\Utilities.h">
|
||||
</ClInclude>
|
||||
<ClCompile Include="..\..\src\ripple\rpc\impl\Yield.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClInclude Include="..\..\src\ripple\rpc\InternalHandler.h">
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rpc\RipplePathFind.h">
|
||||
@@ -3454,10 +3503,6 @@
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rpc\Status.h">
|
||||
</ClInclude>
|
||||
<ClCompile Include="..\..\src\ripple\rpc\tests\Coroutine.test.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rpc\tests\JSONRPC.test.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
@@ -3472,12 +3517,6 @@
|
||||
</ClCompile>
|
||||
<ClInclude Include="..\..\src\ripple\rpc\tests\TestOutputSuite.test.h">
|
||||
</ClInclude>
|
||||
<ClCompile Include="..\..\src\ripple\rpc\tests\Yield.test.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClInclude Include="..\..\src\ripple\rpc\Yield.h">
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\server\Handler.h">
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\server\Handoff.h">
|
||||
@@ -3496,6 +3535,9 @@
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\server\impl\PlainPeer.h">
|
||||
</ClInclude>
|
||||
<ClCompile Include="..\..\src\ripple\server\impl\Port.cpp">
|
||||
<ExcludedFromBuild>True</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\server\impl\Role.cpp">
|
||||
<ExcludedFromBuild>True</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
@@ -3596,6 +3638,10 @@
|
||||
</ClCompile>
|
||||
<ClInclude Include="..\..\src\ripple\shamap\TreeNodeCache.h">
|
||||
</ClInclude>
|
||||
<ClCompile Include="..\..\src\ripple\test\impl\ManualTimeKeeper.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClInclude Include="..\..\src\ripple\test\jtx.h">
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\test\jtx\Account.h">
|
||||
@@ -3762,6 +3808,18 @@
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\test\jtx\utility.h">
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\test\ManualTimeKeeper.h">
|
||||
</ClInclude>
|
||||
<ClCompile Include="..\..\src\ripple\test\mao\impl\Net.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\test\mao\impl\Net_test.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClInclude Include="..\..\src\ripple\test\mao\Net.h">
|
||||
</ClInclude>
|
||||
<ClCompile Include="..\..\src\ripple\unity\app_ledger.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug.classic|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release.classic|x64'">True</ExcludedFromBuild>
|
||||
@@ -3920,8 +3978,6 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClInclude Include="..\..\src\ripple\unl\tests\qalloc.h">
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\unl\tests\Sim1.h">
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\unl\tests\Sim2.h">
|
||||
|
||||
@@ -52,9 +52,6 @@
|
||||
<Filter Include="beast\cxx14">
|
||||
<UniqueIdentifier>{A3DFF000-1717-AE18-DD13-75DC3A36F594}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="beast\cxx14\tests">
|
||||
<UniqueIdentifier>{96F8CA0B-80D3-8AEA-EE13-B39EE1CF91B0}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="beast\hash">
|
||||
<UniqueIdentifier>{FE3C8FFD-FEE1-BDEA-DE7F-24A8DEDCAD20}</UniqueIdentifier>
|
||||
</Filter>
|
||||
@@ -415,12 +412,21 @@
|
||||
<Filter Include="ripple\test">
|
||||
<UniqueIdentifier>{B25F5854-84AE-1CBD-DFFC-6515DD055652}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="ripple\test\impl">
|
||||
<UniqueIdentifier>{CF7F0C3F-3D61-7764-BA8B-5FF38018425C}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="ripple\test\jtx">
|
||||
<UniqueIdentifier>{A21A3B94-5C44-3746-4F10-6FF8FF990CE3}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="ripple\test\jtx\impl">
|
||||
<UniqueIdentifier>{27D70888-7145-691C-0E0A-E511EB3A80A2}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="ripple\test\mao">
|
||||
<UniqueIdentifier>{94B5035A-6D4A-E4FC-DB50-E7E804DC9F13}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="ripple\test\mao\impl">
|
||||
<UniqueIdentifier>{23DE6C05-81D2-7471-D9BB-3AA1D49DE429}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="ripple\unity">
|
||||
<UniqueIdentifier>{5DB3CD0B-B361-B301-9562-697CA8A52B68}</UniqueIdentifier>
|
||||
</Filter>
|
||||
@@ -855,33 +861,9 @@
|
||||
<ClCompile Include="..\..\src\beast\beast\crypto\tests\base64.test.cpp">
|
||||
<Filter>beast\crypto\tests</Filter>
|
||||
</ClCompile>
|
||||
<ClInclude Include="..\..\src\beast\beast\cxx14\algorithm.h">
|
||||
<Filter>beast\cxx14</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\beast\beast\cxx14\config.h">
|
||||
<Filter>beast\cxx14</Filter>
|
||||
</ClInclude>
|
||||
<ClCompile Include="..\..\src\beast\beast\cxx14\cxx14.unity.cpp">
|
||||
<Filter>beast\cxx14</Filter>
|
||||
</ClCompile>
|
||||
<ClInclude Include="..\..\src\beast\beast\cxx14\functional.h">
|
||||
<Filter>beast\cxx14</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\beast\beast\cxx14\iterator.h">
|
||||
<Filter>beast\cxx14</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\beast\beast\cxx14\memory.h">
|
||||
<Filter>beast\cxx14</Filter>
|
||||
</ClInclude>
|
||||
<ClCompile Include="..\..\src\beast\beast\cxx14\tests\integer_sequence.test.cpp">
|
||||
<Filter>beast\cxx14\tests</Filter>
|
||||
</ClCompile>
|
||||
<ClInclude Include="..\..\src\beast\beast\cxx14\type_traits.h">
|
||||
<Filter>beast\cxx14</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\beast\beast\cxx14\utility.h">
|
||||
<Filter>beast\cxx14</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\beast\beast\hash\endian.h">
|
||||
<Filter>beast\hash</Filter>
|
||||
</ClInclude>
|
||||
@@ -1590,9 +1572,6 @@
|
||||
<ClInclude Include="..\..\src\beast\beast\threads\semaphore.h">
|
||||
<Filter>beast\threads</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\beast\beast\threads\SharedData.h">
|
||||
<Filter>beast\threads</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\beast\beast\threads\SharedLockGuard.h">
|
||||
<Filter>beast\threads</Filter>
|
||||
</ClInclude>
|
||||
@@ -1695,15 +1674,9 @@
|
||||
<ClInclude Include="..\..\src\beast\beast\utility\meta.h">
|
||||
<Filter>beast\utility</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\beast\beast\utility\noexcept.h">
|
||||
<Filter>beast\utility</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\beast\beast\utility\PropertyStream.h">
|
||||
<Filter>beast\utility</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\beast\beast\utility\static_initializer.h">
|
||||
<Filter>beast\utility</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\beast\beast\utility\tagged_integer.h">
|
||||
<Filter>beast\utility</Filter>
|
||||
</ClInclude>
|
||||
@@ -1716,9 +1689,6 @@
|
||||
<ClCompile Include="..\..\src\beast\beast\utility\tests\Journal.test.cpp">
|
||||
<Filter>beast\utility\tests</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\beast\beast\utility\tests\static_initializer.test.cpp">
|
||||
<Filter>beast\utility\tests</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\beast\beast\utility\tests\tagged_integer.test.cpp">
|
||||
<Filter>beast\utility\tests</Filter>
|
||||
</ClCompile>
|
||||
@@ -2130,6 +2100,9 @@
|
||||
<ClCompile Include="..\..\src\ripple\app\ledger\impl\InboundLedgers.cpp">
|
||||
<Filter>ripple\app\ledger\impl</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\app\ledger\impl\InboundTransactions.cpp">
|
||||
<Filter>ripple\app\ledger\impl</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\app\ledger\impl\LedgerCleaner.cpp">
|
||||
<Filter>ripple\app\ledger\impl</Filter>
|
||||
</ClCompile>
|
||||
@@ -2151,15 +2124,30 @@
|
||||
<ClCompile Include="..\..\src\ripple\app\ledger\impl\LedgerToJson.cpp">
|
||||
<Filter>ripple\app\ledger\impl</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\app\ledger\impl\LocalTxs.cpp">
|
||||
<Filter>ripple\app\ledger\impl</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\app\ledger\impl\OpenLedger.cpp">
|
||||
<Filter>ripple\app\ledger\impl</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\app\ledger\impl\TransactionAcquire.cpp">
|
||||
<Filter>ripple\app\ledger\impl</Filter>
|
||||
</ClCompile>
|
||||
<ClInclude Include="..\..\src\ripple\app\ledger\impl\TransactionAcquire.h">
|
||||
<Filter>ripple\app\ledger\impl</Filter>
|
||||
</ClInclude>
|
||||
<ClCompile Include="..\..\src\ripple\app\ledger\impl\TransactionMaster.cpp">
|
||||
<Filter>ripple\app\ledger\impl</Filter>
|
||||
</ClCompile>
|
||||
<ClInclude Include="..\..\src\ripple\app\ledger\InboundLedger.h">
|
||||
<Filter>ripple\app\ledger</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\app\ledger\InboundLedgers.h">
|
||||
<Filter>ripple\app\ledger</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\app\ledger\InboundTransactions.h">
|
||||
<Filter>ripple\app\ledger</Filter>
|
||||
</ClInclude>
|
||||
<ClCompile Include="..\..\src\ripple\app\ledger\Ledger.cpp">
|
||||
<Filter>ripple\app\ledger</Filter>
|
||||
</ClCompile>
|
||||
@@ -2193,6 +2181,9 @@
|
||||
<ClInclude Include="..\..\src\ripple\app\ledger\LedgerToJson.h">
|
||||
<Filter>ripple\app\ledger</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\app\ledger\LocalTxs.h">
|
||||
<Filter>ripple\app\ledger</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\app\ledger\OpenLedger.h">
|
||||
<Filter>ripple\app\ledger</Filter>
|
||||
</ClInclude>
|
||||
@@ -2205,6 +2196,9 @@
|
||||
<ClInclude Include="..\..\src\ripple\app\ledger\PendingSaves.h">
|
||||
<Filter>ripple\app\ledger</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\app\ledger\TransactionMaster.h">
|
||||
<Filter>ripple\app\ledger</Filter>
|
||||
</ClInclude>
|
||||
<ClCompile Include="..\..\src\ripple\app\ledger\TransactionStateSF.cpp">
|
||||
<Filter>ripple\app\ledger</Filter>
|
||||
</ClCompile>
|
||||
@@ -2289,6 +2283,12 @@
|
||||
<ClInclude Include="..\..\src\ripple\app\misc\impl\AccountTxPaging.h">
|
||||
<Filter>ripple\app\misc\impl</Filter>
|
||||
</ClInclude>
|
||||
<ClCompile Include="..\..\src\ripple\app\misc\impl\Transaction.cpp">
|
||||
<Filter>ripple\app\misc\impl</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\app\misc\impl\TxQ.cpp">
|
||||
<Filter>ripple\app\misc\impl</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\app\misc\NetworkOPs.cpp">
|
||||
<Filter>ripple\app\misc</Filter>
|
||||
</ClCompile>
|
||||
@@ -2307,6 +2307,12 @@
|
||||
<ClInclude Include="..\..\src\ripple\app\misc\SHAMapStoreImp.h">
|
||||
<Filter>ripple\app\misc</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\app\misc\Transaction.h">
|
||||
<Filter>ripple\app\misc</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\app\misc\TxQ.h">
|
||||
<Filter>ripple\app\misc</Filter>
|
||||
</ClInclude>
|
||||
<ClCompile Include="..\..\src\ripple\app\misc\UniqueNodeList.cpp">
|
||||
<Filter>ripple\app\misc</Filter>
|
||||
</ClCompile>
|
||||
@@ -2442,6 +2448,9 @@
|
||||
<ClCompile Include="..\..\src\ripple\app\tests\DeliverMin.test.cpp">
|
||||
<Filter>ripple\app\tests</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\app\tests\HashRouter_test.cpp">
|
||||
<Filter>ripple\app\tests</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\app\tests\MultiSign.test.cpp">
|
||||
<Filter>ripple\app\tests</Filter>
|
||||
</ClCompile>
|
||||
@@ -2469,9 +2478,15 @@
|
||||
<ClCompile Include="..\..\src\ripple\app\tests\Taker.test.cpp">
|
||||
<Filter>ripple\app\tests</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\app\tests\TxQ_test.cpp">
|
||||
<Filter>ripple\app\tests</Filter>
|
||||
</ClCompile>
|
||||
<ClInclude Include="..\..\src\ripple\app\tx\apply.h">
|
||||
<Filter>ripple\app\tx</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\app\tx\applySteps.h">
|
||||
<Filter>ripple\app\tx</Filter>
|
||||
</ClInclude>
|
||||
<ClCompile Include="..\..\src\ripple\app\tx\impl\apply.cpp">
|
||||
<Filter>ripple\app\tx\impl</Filter>
|
||||
</ClCompile>
|
||||
@@ -2481,6 +2496,9 @@
|
||||
<ClInclude Include="..\..\src\ripple\app\tx\impl\ApplyContext.h">
|
||||
<Filter>ripple\app\tx\impl</Filter>
|
||||
</ClInclude>
|
||||
<ClCompile Include="..\..\src\ripple\app\tx\impl\applySteps.cpp">
|
||||
<Filter>ripple\app\tx\impl</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\app\tx\impl\BookTip.cpp">
|
||||
<Filter>ripple\app\tx\impl</Filter>
|
||||
</ClCompile>
|
||||
@@ -2517,12 +2535,6 @@
|
||||
<ClInclude Include="..\..\src\ripple\app\tx\impl\CreateTicket.h">
|
||||
<Filter>ripple\app\tx\impl</Filter>
|
||||
</ClInclude>
|
||||
<ClCompile Include="..\..\src\ripple\app\tx\impl\InboundTransactions.cpp">
|
||||
<Filter>ripple\app\tx\impl</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\app\tx\impl\LocalTxs.cpp">
|
||||
<Filter>ripple\app\tx\impl</Filter>
|
||||
</ClCompile>
|
||||
<ClInclude Include="..\..\src\ripple\app\tx\impl\Offer.h">
|
||||
<Filter>ripple\app\tx\impl</Filter>
|
||||
</ClInclude>
|
||||
@@ -2580,45 +2592,18 @@
|
||||
<ClInclude Include="..\..\src\ripple\app\tx\impl\Taker.h">
|
||||
<Filter>ripple\app\tx\impl</Filter>
|
||||
</ClInclude>
|
||||
<ClCompile Include="..\..\src\ripple\app\tx\impl\Transaction.cpp">
|
||||
<Filter>ripple\app\tx\impl</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\app\tx\impl\TransactionAcquire.cpp">
|
||||
<Filter>ripple\app\tx\impl</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\app\tx\impl\TransactionMaster.cpp">
|
||||
<Filter>ripple\app\tx\impl</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\app\tx\impl\Transactor.cpp">
|
||||
<Filter>ripple\app\tx\impl</Filter>
|
||||
</ClCompile>
|
||||
<ClInclude Include="..\..\src\ripple\app\tx\impl\Transactor.h">
|
||||
<Filter>ripple\app\tx\impl</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\app\tx\InboundTransactions.h">
|
||||
<Filter>ripple\app\tx</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\app\tx\LocalTxs.h">
|
||||
<Filter>ripple\app\tx</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\app\tx\Transaction.h">
|
||||
<Filter>ripple\app\tx</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\app\tx\TransactionAcquire.h">
|
||||
<Filter>ripple\app\tx</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\app\tx\TransactionMaster.h">
|
||||
<Filter>ripple\app\tx</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\basics\base_uint.h">
|
||||
<Filter>ripple\basics</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\basics\BasicConfig.h">
|
||||
<Filter>ripple\basics</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\basics\BasicTypes.h">
|
||||
<Filter>ripple\basics</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\basics\Blob.h">
|
||||
<Filter>ripple\basics</Filter>
|
||||
</ClInclude>
|
||||
@@ -2667,6 +2652,9 @@
|
||||
<ClCompile Include="..\..\src\ripple\basics\impl\make_SSLContext.cpp">
|
||||
<Filter>ripple\basics\impl</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\basics\impl\mulDiv.cpp">
|
||||
<Filter>ripple\basics\impl</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\basics\impl\RangeSet.cpp">
|
||||
<Filter>ripple\basics\impl</Filter>
|
||||
</ClCompile>
|
||||
@@ -2703,6 +2691,12 @@
|
||||
<ClInclude Include="..\..\src\ripple\basics\make_SSLContext.h">
|
||||
<Filter>ripple\basics</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\basics\mulDiv.h">
|
||||
<Filter>ripple\basics</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\basics\qalloc.h">
|
||||
<Filter>ripple\basics</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\basics\RangeSet.h">
|
||||
<Filter>ripple\basics</Filter>
|
||||
</ClInclude>
|
||||
@@ -2736,12 +2730,18 @@
|
||||
<ClCompile Include="..\..\src\ripple\basics\tests\CheckLibraryVersions.test.cpp">
|
||||
<Filter>ripple\basics\tests</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\basics\tests\contract.test.cpp">
|
||||
<Filter>ripple\basics\tests</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\basics\tests\hardened_hash_test.cpp">
|
||||
<Filter>ripple\basics\tests</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\basics\tests\KeyCache.test.cpp">
|
||||
<Filter>ripple\basics\tests</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\basics\tests\mulDiv.test.cpp">
|
||||
<Filter>ripple\basics\tests</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\basics\tests\RangeSet.test.cpp">
|
||||
<Filter>ripple\basics\tests</Filter>
|
||||
</ClCompile>
|
||||
@@ -2814,6 +2814,12 @@
|
||||
<ClInclude Include="..\..\src\ripple\core\Job.h">
|
||||
<Filter>ripple\core</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\core\JobCoro.h">
|
||||
<Filter>ripple\core</Filter>
|
||||
</ClInclude>
|
||||
<None Include="..\..\src\ripple\core\JobCoro.ipp">
|
||||
<Filter>ripple\core</Filter>
|
||||
</None>
|
||||
<ClInclude Include="..\..\src\ripple\core\JobQueue.h">
|
||||
<Filter>ripple\core</Filter>
|
||||
</ClInclude>
|
||||
@@ -2841,6 +2847,9 @@
|
||||
<ClCompile Include="..\..\src\ripple\core\tests\Config.test.cpp">
|
||||
<Filter>ripple\core\tests</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\core\tests\Coroutine.test.cpp">
|
||||
<Filter>ripple\core\tests</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\core\tests\LoadFeeTrack.test.cpp">
|
||||
<Filter>ripple\core\tests</Filter>
|
||||
</ClCompile>
|
||||
@@ -3015,6 +3024,9 @@
|
||||
<ClInclude Include="..\..\src\ripple\ledger\ApplyViewImpl.h">
|
||||
<Filter>ripple\ledger</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\ledger\BookDirs.h">
|
||||
<Filter>ripple\ledger</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\ledger\CachedSLEs.h">
|
||||
<Filter>ripple\ledger</Filter>
|
||||
</ClInclude>
|
||||
@@ -3048,6 +3060,9 @@
|
||||
<ClCompile Include="..\..\src\ripple\ledger\impl\ApplyViewImpl.cpp">
|
||||
<Filter>ripple\ledger\impl</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\ledger\impl\BookDirs.cpp">
|
||||
<Filter>ripple\ledger\impl</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\ledger\impl\CachedSLEs.cpp">
|
||||
<Filter>ripple\ledger\impl</Filter>
|
||||
</ClCompile>
|
||||
@@ -3090,6 +3105,9 @@
|
||||
<ClInclude Include="..\..\src\ripple\ledger\Sandbox.h">
|
||||
<Filter>ripple\ledger</Filter>
|
||||
</ClInclude>
|
||||
<ClCompile Include="..\..\src\ripple\ledger\tests\BookDirs_test.cpp">
|
||||
<Filter>ripple\ledger\tests</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\ledger\tests\Directory_test.cpp">
|
||||
<Filter>ripple\ledger\tests</Filter>
|
||||
</ClCompile>
|
||||
@@ -3099,6 +3117,9 @@
|
||||
<ClCompile Include="..\..\src\ripple\ledger\tests\PaymentSandbox_test.cpp">
|
||||
<Filter>ripple\ledger\tests</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\ledger\tests\PendingSaves_test.cpp">
|
||||
<Filter>ripple\ledger\tests</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\ledger\tests\SkipList_test.cpp">
|
||||
<Filter>ripple\ledger\tests</Filter>
|
||||
</ClCompile>
|
||||
@@ -3219,9 +3240,6 @@
|
||||
<ClCompile Include="..\..\src\ripple\nodestore\impl\NodeObject.cpp">
|
||||
<Filter>ripple\nodestore\impl</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\nodestore\impl\ScopedMetrics.cpp">
|
||||
<Filter>ripple\nodestore\impl</Filter>
|
||||
</ClCompile>
|
||||
<ClInclude Include="..\..\src\ripple\nodestore\impl\Tuning.h">
|
||||
<Filter>ripple\nodestore\impl</Filter>
|
||||
</ClInclude>
|
||||
@@ -3234,9 +3252,6 @@
|
||||
<ClInclude Include="..\..\src\ripple\nodestore\Scheduler.h">
|
||||
<Filter>ripple\nodestore</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\nodestore\ScopedMetrics.h">
|
||||
<Filter>ripple\nodestore</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\nodestore\Task.h">
|
||||
<Filter>ripple\nodestore</Filter>
|
||||
</ClInclude>
|
||||
@@ -3261,9 +3276,15 @@
|
||||
<ClInclude Include="..\..\src\ripple\nodestore\Types.h">
|
||||
<Filter>ripple\nodestore</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\overlay\ClusterNodeStatus.h">
|
||||
<ClInclude Include="..\..\src\ripple\overlay\Cluster.h">
|
||||
<Filter>ripple\overlay</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\overlay\ClusterNode.h">
|
||||
<Filter>ripple\overlay</Filter>
|
||||
</ClInclude>
|
||||
<ClCompile Include="..\..\src\ripple\overlay\impl\Cluster.cpp">
|
||||
<Filter>ripple\overlay\impl</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\overlay\impl\ConnectAttempt.cpp">
|
||||
<Filter>ripple\overlay\impl</Filter>
|
||||
</ClCompile>
|
||||
@@ -3303,6 +3324,12 @@
|
||||
<ClInclude Include="..\..\src\ripple\overlay\impl\TMHello.h">
|
||||
<Filter>ripple\overlay\impl</Filter>
|
||||
</ClInclude>
|
||||
<ClCompile Include="..\..\src\ripple\overlay\impl\TrafficCount.cpp">
|
||||
<Filter>ripple\overlay\impl</Filter>
|
||||
</ClCompile>
|
||||
<ClInclude Include="..\..\src\ripple\overlay\impl\TrafficCount.h">
|
||||
<Filter>ripple\overlay\impl</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\overlay\impl\Tuning.h">
|
||||
<Filter>ripple\overlay\impl</Filter>
|
||||
</ClInclude>
|
||||
@@ -3330,6 +3357,9 @@
|
||||
<None Include="..\..\src\ripple\overlay\README.md">
|
||||
<Filter>ripple\overlay</Filter>
|
||||
</None>
|
||||
<ClCompile Include="..\..\src\ripple\overlay\tests\cluster_test.cpp">
|
||||
<Filter>ripple\overlay\tests</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\overlay\tests\manifest_test.cpp">
|
||||
<Filter>ripple\overlay\tests</Filter>
|
||||
</ClCompile>
|
||||
@@ -3465,6 +3495,9 @@
|
||||
<ClCompile Include="..\..\src\ripple\protocol\impl\AccountID.cpp">
|
||||
<Filter>ripple\protocol\impl</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\protocol\impl\Book.cpp">
|
||||
<Filter>ripple\protocol\impl</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\protocol\impl\BuildInfo.cpp">
|
||||
<Filter>ripple\protocol\impl</Filter>
|
||||
</ClCompile>
|
||||
@@ -3492,6 +3525,9 @@
|
||||
<ClCompile Include="..\..\src\ripple\protocol\impl\IOUAmount.cpp">
|
||||
<Filter>ripple\protocol\impl</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\protocol\impl\Issue.cpp">
|
||||
<Filter>ripple\protocol\impl</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\protocol\impl\Keylet.cpp">
|
||||
<Filter>ripple\protocol\impl</Filter>
|
||||
</ClCompile>
|
||||
@@ -3705,6 +3741,9 @@
|
||||
<ClCompile Include="..\..\src\ripple\protocol\tests\BuildInfo.test.cpp">
|
||||
<Filter>ripple\protocol\tests</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\protocol\tests\digest_test.cpp">
|
||||
<Filter>ripple\protocol\tests</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\protocol\tests\InnerObjectFormats.test.cpp">
|
||||
<Filter>ripple\protocol\tests</Filter>
|
||||
</ClCompile>
|
||||
@@ -3723,6 +3762,9 @@
|
||||
<ClCompile Include="..\..\src\ripple\protocol\tests\RippleAddress.test.cpp">
|
||||
<Filter>ripple\protocol\tests</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\protocol\tests\STAccount.test.cpp">
|
||||
<Filter>ripple\protocol\tests</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\protocol\tests\STAmount.test.cpp">
|
||||
<Filter>ripple\protocol\tests</Filter>
|
||||
</ClCompile>
|
||||
@@ -3819,9 +3861,6 @@
|
||||
<ClInclude Include="..\..\src\ripple\rpc\Context.h">
|
||||
<Filter>ripple\rpc</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rpc\Coroutine.h">
|
||||
<Filter>ripple\rpc</Filter>
|
||||
</ClInclude>
|
||||
<ClCompile Include="..\..\src\ripple\rpc\handlers\AccountCurrenciesHandler.cpp">
|
||||
<Filter>ripple\rpc\handlers</Filter>
|
||||
</ClCompile>
|
||||
@@ -3864,6 +3903,9 @@
|
||||
<ClCompile Include="..\..\src\ripple\rpc\handlers\Feature1.cpp">
|
||||
<Filter>ripple\rpc\handlers</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rpc\handlers\Fee1.cpp">
|
||||
<Filter>ripple\rpc\handlers</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rpc\handlers\FetchInfo.cpp">
|
||||
<Filter>ripple\rpc\handlers</Filter>
|
||||
</ClCompile>
|
||||
@@ -4026,9 +4068,6 @@
|
||||
<ClInclude Include="..\..\src\ripple\rpc\impl\Accounts.h">
|
||||
<Filter>ripple\rpc\impl</Filter>
|
||||
</ClInclude>
|
||||
<ClCompile Include="..\..\src\ripple\rpc\impl\Coroutine.cpp">
|
||||
<Filter>ripple\rpc\impl</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rpc\impl\GetAccountObjects.cpp">
|
||||
<Filter>ripple\rpc\impl</Filter>
|
||||
</ClCompile>
|
||||
@@ -4089,9 +4128,6 @@
|
||||
<ClInclude Include="..\..\src\ripple\rpc\impl\Utilities.h">
|
||||
<Filter>ripple\rpc\impl</Filter>
|
||||
</ClInclude>
|
||||
<ClCompile Include="..\..\src\ripple\rpc\impl\Yield.cpp">
|
||||
<Filter>ripple\rpc\impl</Filter>
|
||||
</ClCompile>
|
||||
<ClInclude Include="..\..\src\ripple\rpc\InternalHandler.h">
|
||||
<Filter>ripple\rpc</Filter>
|
||||
</ClInclude>
|
||||
@@ -4107,9 +4143,6 @@
|
||||
<ClInclude Include="..\..\src\ripple\rpc\Status.h">
|
||||
<Filter>ripple\rpc</Filter>
|
||||
</ClInclude>
|
||||
<ClCompile Include="..\..\src\ripple\rpc\tests\Coroutine.test.cpp">
|
||||
<Filter>ripple\rpc\tests</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rpc\tests\JSONRPC.test.cpp">
|
||||
<Filter>ripple\rpc\tests</Filter>
|
||||
</ClCompile>
|
||||
@@ -4122,12 +4155,6 @@
|
||||
<ClInclude Include="..\..\src\ripple\rpc\tests\TestOutputSuite.test.h">
|
||||
<Filter>ripple\rpc\tests</Filter>
|
||||
</ClInclude>
|
||||
<ClCompile Include="..\..\src\ripple\rpc\tests\Yield.test.cpp">
|
||||
<Filter>ripple\rpc\tests</Filter>
|
||||
</ClCompile>
|
||||
<ClInclude Include="..\..\src\ripple\rpc\Yield.h">
|
||||
<Filter>ripple\rpc</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\server\Handler.h">
|
||||
<Filter>ripple\server</Filter>
|
||||
</ClInclude>
|
||||
@@ -4152,6 +4179,9 @@
|
||||
<ClInclude Include="..\..\src\ripple\server\impl\PlainPeer.h">
|
||||
<Filter>ripple\server\impl</Filter>
|
||||
</ClInclude>
|
||||
<ClCompile Include="..\..\src\ripple\server\impl\Port.cpp">
|
||||
<Filter>ripple\server\impl</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\server\impl\Role.cpp">
|
||||
<Filter>ripple\server\impl</Filter>
|
||||
</ClCompile>
|
||||
@@ -4266,6 +4296,9 @@
|
||||
<ClInclude Include="..\..\src\ripple\shamap\TreeNodeCache.h">
|
||||
<Filter>ripple\shamap</Filter>
|
||||
</ClInclude>
|
||||
<ClCompile Include="..\..\src\ripple\test\impl\ManualTimeKeeper.cpp">
|
||||
<Filter>ripple\test\impl</Filter>
|
||||
</ClCompile>
|
||||
<ClInclude Include="..\..\src\ripple\test\jtx.h">
|
||||
<Filter>ripple\test</Filter>
|
||||
</ClInclude>
|
||||
@@ -4440,6 +4473,18 @@
|
||||
<ClInclude Include="..\..\src\ripple\test\jtx\utility.h">
|
||||
<Filter>ripple\test\jtx</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\test\ManualTimeKeeper.h">
|
||||
<Filter>ripple\test</Filter>
|
||||
</ClInclude>
|
||||
<ClCompile Include="..\..\src\ripple\test\mao\impl\Net.cpp">
|
||||
<Filter>ripple\test\mao\impl</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\test\mao\impl\Net_test.cpp">
|
||||
<Filter>ripple\test\mao\impl</Filter>
|
||||
</ClCompile>
|
||||
<ClInclude Include="..\..\src\ripple\test\mao\Net.h">
|
||||
<Filter>ripple\test\mao</Filter>
|
||||
</ClInclude>
|
||||
<ClCompile Include="..\..\src\ripple\unity\app_ledger.cpp">
|
||||
<Filter>ripple\unity</Filter>
|
||||
</ClCompile>
|
||||
@@ -4566,9 +4611,6 @@
|
||||
<ClCompile Include="..\..\src\ripple\unl\tests\Network_test.cpp">
|
||||
<Filter>ripple\unl\tests</Filter>
|
||||
</ClCompile>
|
||||
<ClInclude Include="..\..\src\ripple\unl\tests\qalloc.h">
|
||||
<Filter>ripple\unl\tests</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\unl\tests\Sim1.h">
|
||||
<Filter>ripple\unl\tests</Filter>
|
||||
</ClInclude>
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 59 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 59 KiB |
@@ -1,54 +0,0 @@
|
||||
%define rippled_branch %(echo $RIPPLED_BRANCH)
|
||||
Name: rippled
|
||||
# Version must be limited to MAJOR.MINOR.PATCH
|
||||
Version: 0.30.0
|
||||
# Release should include either the build or hotfix number (ex: hf1%{?dist} or b2%{?dist})
|
||||
# If there is no b# or hf#, then use 1%{?dist}
|
||||
Release: %{?dist}
|
||||
Summary: Ripple peer-to-peer network daemon
|
||||
|
||||
Group: Applications/Internet
|
||||
License: ISC
|
||||
URL: https://github.com/ripple/rippled
|
||||
|
||||
# curl -L -o SOURCES/rippled-release.zip https://github.com/ripple/rippled/archive/${RIPPLED_BRANCH}.zip
|
||||
Source0: rippled-%{rippled_branch}.zip
|
||||
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
|
||||
|
||||
BuildRequires: gcc-c++ scons openssl-devel protobuf-devel
|
||||
Requires: protobuf openssl
|
||||
|
||||
|
||||
%description
|
||||
Rippled is the server component of the Ripple network.
|
||||
|
||||
|
||||
%prep
|
||||
%setup -n rippled-%{rippled_branch}
|
||||
|
||||
|
||||
%build
|
||||
scons -j `grep -c processor /proc/cpuinfo`
|
||||
|
||||
|
||||
%install
|
||||
rm -rf %{buildroot}
|
||||
mkdir -p %{buildroot}/usr/share/%{name}
|
||||
cp LICENSE %{buildroot}/usr/share/%{name}/
|
||||
mkdir -p %{buildroot}/usr/bin
|
||||
cp build/rippled %{buildroot}/usr/bin/rippled
|
||||
mkdir -p %{buildroot}/etc/%{name}
|
||||
cp doc/rippled-example.cfg %{buildroot}/etc/%{name}/rippled.cfg
|
||||
mkdir -p %{buildroot}/var/lib/%{name}/db
|
||||
mkdir -p %{buildroot}/var/log/%{name}
|
||||
|
||||
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
/usr/bin/rippled
|
||||
/usr/share/rippled/LICENSE
|
||||
%config(noreplace) /etc/rippled/rippled.cfg
|
||||
265
SConstruct
265
SConstruct
@@ -61,24 +61,33 @@ The following environment variables modify the build environment:
|
||||
Path to the boost directory.
|
||||
OPENSSL_ROOT
|
||||
Path to the openssl directory.
|
||||
PROTOBUF_DIR
|
||||
Path to the protobuf directory. This is usually only needed when
|
||||
the installed protobuf library uses a different ABI than clang
|
||||
(as with ubuntu 15.10).
|
||||
|
||||
The following extra options may be used:
|
||||
--ninja Generate a `build.ninja` build file for the specified target
|
||||
(see: https://martine.github.io/ninja/). Only gcc and clang targets
|
||||
are supported.
|
||||
|
||||
GCC 5 support: There is transitional support for user-installed gcc 5. Setting
|
||||
the environment variable: `RIPPLED_OLD_GCC_ABI` to one enables the transitional
|
||||
support. Due to an ABI change between gcc 4 and gcc 5, it is assumed all
|
||||
libraries are built with the old, gcc 4 ABI. Since no linux distro has upgraded
|
||||
to gcc 5, this allows us to use the package manager to install rippled
|
||||
dependencies and to easily switch between gcc 4 and gcc 5. It also means if the
|
||||
user builds C++ dependencies themselves - such as boost - they must either be
|
||||
built with gcc 4 or with the preprocessor flag `_GLIBCXX_USE_CXX11_ABI` set to
|
||||
zero. When linux distros upgrade to gcc 5, the transitional support will be
|
||||
removed. To enable C++-14 support, define the environment variable `RIPPLED_USE_CPP_14`
|
||||
to one. This is also transitional and will be removed when we permanently enable C++ 14
|
||||
support.
|
||||
--static On linux, link protobuf, openssl, libc++, and boost statically
|
||||
|
||||
GCC 5: If the gcc toolchain is used, gcc version 5 or better is required. On
|
||||
linux distros that ship with gcc 4 (ubuntu < 15.10), rippled will force gcc
|
||||
to use gcc4's ABI (there was an ABI change between versions). This allows us
|
||||
to use the package manager to install rippled dependencies. It also means if
|
||||
the user builds C++ dependencies themselves - such as boost - they must
|
||||
either be built with gcc 4 or with the preprocessor flag
|
||||
`_GLIBCXX_USE_CXX11_ABI` set to zero.
|
||||
|
||||
Clang on linux: Clang cannot use the new gcc 5 ABI (clang does not know about
|
||||
the `abi_tag` attribute). On linux distros that ship with the gcc 5 ABI
|
||||
(ubuntu >= 15.10), building with clang requires building boost and protobuf
|
||||
with the old ABI (best to build them with clang). It is best to statically
|
||||
link rippled in this scenario (use the `--static` with scons), as dynamic
|
||||
linking may use a library with the incorrect ABI.
|
||||
|
||||
|
||||
'''
|
||||
#
|
||||
@@ -113,6 +122,9 @@ import scons_to_ninja
|
||||
AddOption('--ninja', dest='ninja', action='store_true',
|
||||
help='generate ninja build file build.ninja')
|
||||
|
||||
AddOption('--static', dest='static', action='store_true',
|
||||
help='On linux, link protobuf, openssl, libc++, and boost statically')
|
||||
|
||||
def parse_time(t):
|
||||
l = len(t.split())
|
||||
if l==5:
|
||||
@@ -122,14 +134,18 @@ def parse_time(t):
|
||||
else:
|
||||
return time.strptime(t, '%a %b %d %H:%M:%S %Z %Y')
|
||||
|
||||
CHECK_PLATFORMS = 'Debian', 'Ubuntu'
|
||||
CHECK_COMMAND = 'openssl version -a'
|
||||
CHECK_LINE = 'built on: '
|
||||
BUILD_TIME = 'Mon Apr 7 20:33:19 UTC 2014'
|
||||
OPENSSL_ERROR = ('Your openSSL was built on %s; '
|
||||
'rippled needs a version built on or after %s.')
|
||||
UNITY_BUILD_DIRECTORY = 'src/ripple/unity/'
|
||||
USE_CPP_14 = os.getenv('RIPPLED_USE_CPP_14')
|
||||
|
||||
def memoize(function):
|
||||
memo = {}
|
||||
def wrapper(*args):
|
||||
if args in memo:
|
||||
return memo[args]
|
||||
else:
|
||||
rv = function(*args)
|
||||
memo[args] = rv
|
||||
return rv
|
||||
return wrapper
|
||||
|
||||
def check_openssl():
|
||||
if Beast.system.platform not in ['Debian', 'Ubuntu']:
|
||||
@@ -282,6 +298,38 @@ def print_coms(target, source, env):
|
||||
def is_debug_variant(variant):
|
||||
return variant in ('debug', 'coverage')
|
||||
|
||||
@memoize
|
||||
def is_ubuntu():
|
||||
try:
|
||||
return "Ubuntu" == subprocess.check_output(['lsb_release', '-si'],
|
||||
stderr=subprocess.STDOUT).strip()
|
||||
except:
|
||||
return False
|
||||
|
||||
@memoize
|
||||
def use_gcc4_abi(cc_cmd):
|
||||
if os.getenv('RIPPLED_OLD_GCC_ABI'):
|
||||
return True
|
||||
gcc_ver = ''
|
||||
ubuntu_ver = None
|
||||
try:
|
||||
if 'gcc' in cc_cmd:
|
||||
gcc_ver = subprocess.check_output([cc_cmd, '-dumpversion'],
|
||||
stderr=subprocess.STDOUT).strip()
|
||||
else:
|
||||
gcc_ver = '5' # assume gcc 5 for ABI purposes for clang
|
||||
|
||||
if is_ubuntu():
|
||||
ubuntu_ver = float(
|
||||
subprocess.check_output(['lsb_release', '-sr'],
|
||||
stderr=subprocess.STDOUT).strip())
|
||||
except:
|
||||
print("Unable to determine gcc version. Assuming native ABI.")
|
||||
return False
|
||||
if ubuntu_ver and ubuntu_ver < 15.1 and gcc_ver.startswith('5'):
|
||||
return True
|
||||
return False
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
# Set construction variables for the base environment
|
||||
@@ -300,16 +348,7 @@ def config_base(env):
|
||||
,{'HAVE_USLEEP' : '1'}
|
||||
,{'SOCI_CXX_C11' : '1'}
|
||||
,'_SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS'
|
||||
])
|
||||
|
||||
if USE_CPP_14:
|
||||
env.Append(CPPDEFINES=[
|
||||
'-DBEAST_NO_CXX14_COMPATIBILITY',
|
||||
'-DBEAST_NO_CXX14_INTEGER_SEQUENCE',
|
||||
'-DBEAST_NO_CXX14_MAKE_UNIQUE',
|
||||
'-DBEAST_NO_CXX14_EQUAL',
|
||||
'-DBOOST_NO_AUTO_PTR',
|
||||
'-DBEAST_NO_CXX14_MAKE_REVERSE_ITERATOR',
|
||||
,'-DBOOST_NO_AUTO_PTR'
|
||||
])
|
||||
|
||||
try:
|
||||
@@ -321,6 +360,12 @@ def config_base(env):
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
try:
|
||||
protobuf_dir = os.environ['PROTOBUF_DIR']
|
||||
env.Append(LIBPATH=[protobuf_dir])
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
if Beast.system.windows:
|
||||
try:
|
||||
OPENSSL_ROOT = os.path.normpath(os.environ['OPENSSL_ROOT'])
|
||||
@@ -348,14 +393,40 @@ def config_base(env):
|
||||
env.Append(CPPPATH=[os.path.join(profile_jemalloc, 'include')])
|
||||
env.Append(LINKFLAGS=['-Wl,-rpath,' + os.path.join(profile_jemalloc, 'lib')])
|
||||
|
||||
def gccStdLibDir():
|
||||
def add_static_libs(env, static_libs, dyn_libs=None):
|
||||
if not 'HASSTATICLIBS' in env:
|
||||
env['HASSTATICLIBS'] = True
|
||||
env.Replace(LINKCOM=env['LINKCOM'] + " -Wl,-Bstatic $STATICLIBS -Wl,-Bdynamic $DYNAMICLIBS")
|
||||
for k,l in [('STATICLIBS', static_libs or []), ('DYNAMICLIBS', dyn_libs or [])]:
|
||||
c = env.get(k, '')
|
||||
for f in l:
|
||||
c += ' -l' + f
|
||||
env[k] = c
|
||||
|
||||
def get_libs(lib, static):
|
||||
'''Returns a tuple of lists. The first element is the static libs,
|
||||
the second element is the dynamic libs
|
||||
'''
|
||||
always_dynamic = ['dl', 'pthread', 'z', # for ubuntu
|
||||
'gssapi_krb5', 'krb5', 'com_err', 'k5crypto', # for fedora
|
||||
]
|
||||
try:
|
||||
for l in subprocess.check_output(['gcc', '-v'], stderr=subprocess.STDOUT).split():
|
||||
if l.startswith('--prefix'):
|
||||
return l.split('=')[1] + '/lib64'
|
||||
cmd = ['pkg-config', '--static', '--libs', lib]
|
||||
libs = subprocess.check_output(cmd,
|
||||
stderr=subprocess.STDOUT).strip()
|
||||
all_libs = [l[2:] for l in libs.split() if l.startswith('-l')]
|
||||
if not static:
|
||||
return ([], all_libs)
|
||||
static_libs = []
|
||||
dynamic_libs = []
|
||||
for l in all_libs:
|
||||
if l in always_dynamic:
|
||||
dynamic_libs.append(l)
|
||||
else:
|
||||
static_libs.append(l)
|
||||
return (static_libs, dynamic_libs)
|
||||
except:
|
||||
pass
|
||||
raise SCons.UserError('Could not find gccStdLibDir')
|
||||
raise Exception('pkg-config failed for ' + lib)
|
||||
|
||||
# Set toolchain and variant specific construction variables
|
||||
def config_env(toolchain, variant, env):
|
||||
@@ -373,10 +444,19 @@ def config_env(toolchain, variant, env):
|
||||
env['BOOST_ROOT'],
|
||||
])
|
||||
|
||||
if should_link_static() and not Beast.system.linux:
|
||||
raise Exception("Static linking is only implemented for linux.")
|
||||
|
||||
if toolchain in Split('clang gcc'):
|
||||
if Beast.system.linux:
|
||||
env.ParseConfig('pkg-config --static --cflags --libs openssl')
|
||||
env.ParseConfig('pkg-config --static --cflags --libs protobuf')
|
||||
link_static = should_link_static()
|
||||
for l in ['openssl', 'protobuf']:
|
||||
static, dynamic = get_libs(l, link_static)
|
||||
if link_static:
|
||||
add_static_libs(env, static, dynamic)
|
||||
else:
|
||||
env.Append(LIBS=dynamic)
|
||||
env.ParseConfig('pkg-config --static --cflags ' + l)
|
||||
|
||||
env.Prepend(CFLAGS=['-Wall'])
|
||||
env.Prepend(CXXFLAGS=['-Wall'])
|
||||
@@ -409,7 +489,7 @@ def config_env(toolchain, variant, env):
|
||||
|
||||
env.Append(CXXFLAGS=[
|
||||
'-frtti',
|
||||
'-std=c++14' if USE_CPP_14 else '-std=c++11',
|
||||
'-std=c++14',
|
||||
'-Wno-invalid-offsetof'])
|
||||
|
||||
env.Append(CPPDEFINES=['_FILE_OFFSET_BITS=64'])
|
||||
@@ -428,21 +508,15 @@ def config_env(toolchain, variant, env):
|
||||
'-Wno-unused-function',
|
||||
])
|
||||
else:
|
||||
if should_link_static():
|
||||
env.Append(LINKFLAGS=[
|
||||
'-static-libstdc++',
|
||||
])
|
||||
if use_gcc4_abi(env['CC'] if 'CC' in env else 'gcc'):
|
||||
env.Append(CPPDEFINES={
|
||||
'-D_GLIBCXX_USE_CXX11_ABI' : 0
|
||||
})
|
||||
if toolchain == 'gcc':
|
||||
if os.getenv('RIPPLED_OLD_GCC_ABI'):
|
||||
gcc_ver = ''
|
||||
try:
|
||||
gcc_ver = subprocess.check_output(['gcc', '-dumpversion'],
|
||||
stderr=subprocess.STDOUT).strip()
|
||||
except:
|
||||
pass
|
||||
if gcc_ver.startswith('5'):
|
||||
# remove rpath and CXX11_ABI flag when distro uses
|
||||
# non-user installed gcc 5
|
||||
env.Append(CPPDEFINES={
|
||||
'-D_GLIBCXX_USE_CXX11_ABI' : 0
|
||||
})
|
||||
env.Append(LINKFLAGS=['-Wl,-rpath,' + gccStdLibDir()])
|
||||
|
||||
env.Append(CCFLAGS=[
|
||||
'-Wno-unused-but-set-variable',
|
||||
@@ -459,16 +533,19 @@ def config_env(toolchain, variant, env):
|
||||
'boost_system',
|
||||
'boost_thread'
|
||||
]
|
||||
# We prefer static libraries for boost
|
||||
if env.get('BOOST_ROOT'):
|
||||
static_libs = ['%s/stage/lib/lib%s.a' % (env['BOOST_ROOT'], l) for
|
||||
l in boost_libs]
|
||||
if all(os.path.exists(f) for f in static_libs):
|
||||
boost_libs = [File(f) for f in static_libs]
|
||||
|
||||
env.Append(LIBS=boost_libs)
|
||||
env.Append(LIBS=['dl'])
|
||||
|
||||
if should_link_static():
|
||||
add_static_libs(env, boost_libs)
|
||||
else:
|
||||
# We prefer static libraries for boost
|
||||
if env.get('BOOST_ROOT'):
|
||||
static_libs = ['%s/stage/lib/lib%s.a' % (env['BOOST_ROOT'], l) for
|
||||
l in boost_libs]
|
||||
if all(os.path.exists(f) for f in static_libs):
|
||||
boost_libs = [File(f) for f in static_libs]
|
||||
env.Append(LIBS=boost_libs)
|
||||
|
||||
if Beast.system.osx:
|
||||
env.Append(LIBS=[
|
||||
'crypto',
|
||||
@@ -567,9 +644,18 @@ def config_env(toolchain, variant, env):
|
||||
'_CRT_SECURE_NO_WARNINGS',
|
||||
'WIN32_CONSOLE',
|
||||
])
|
||||
if variant == 'debug':
|
||||
env.Append(LIBS=[
|
||||
'VC/static/ssleay32MTd.lib',
|
||||
'VC/static/libeay32MTd.lib',
|
||||
])
|
||||
else:
|
||||
env.Append(LIBS=[
|
||||
'VC/static/ssleay32MT.lib',
|
||||
'VC/static/libeay32MT.lib',
|
||||
])
|
||||
env.Append(LIBS=[
|
||||
'ssleay32.lib',
|
||||
'libeay32.lib',
|
||||
'legacy_stdio_definitions.lib',
|
||||
'Shlwapi.lib',
|
||||
'kernel32.lib',
|
||||
'user32.lib',
|
||||
@@ -728,6 +814,22 @@ def get_soci_sources(style):
|
||||
CPPPATH=cpp_path)
|
||||
return result
|
||||
|
||||
def use_shp(toolchain):
|
||||
'''
|
||||
Return True if we want to use the --system-header-prefix command-line switch
|
||||
'''
|
||||
if toolchain != 'clang':
|
||||
return False
|
||||
if use_shp.cache is None:
|
||||
try:
|
||||
ver = subprocess.check_output(
|
||||
['clang', '--version'], stderr=subprocess.STDOUT).strip()
|
||||
use_shp.cache = 'version 3.4' not in ver and 'version 3.0' not in ver
|
||||
except:
|
||||
use_shp.cache = False
|
||||
return use_shp.cache
|
||||
use_shp.cache = None
|
||||
|
||||
def get_common_sources(toolchain):
|
||||
result = []
|
||||
if toolchain == 'msvc':
|
||||
@@ -765,6 +867,11 @@ def get_classic_sources(toolchain):
|
||||
append_sources(result, *list_sources('src/ripple/test', '.cpp'))
|
||||
append_sources(result, *list_sources('src/ripple/unl', '.cpp'))
|
||||
|
||||
if use_shp(toolchain):
|
||||
cc_flags = {'CCFLAGS': ['--system-header-prefix=rocksdb2']}
|
||||
else:
|
||||
cc_flags = {}
|
||||
|
||||
append_sources(
|
||||
result,
|
||||
*list_sources('src/ripple/nodestore', '.cpp'),
|
||||
@@ -772,7 +879,8 @@ def get_classic_sources(toolchain):
|
||||
'src/rocksdb2/include',
|
||||
'src/snappy/snappy',
|
||||
'src/snappy/config',
|
||||
])
|
||||
],
|
||||
**cc_flags)
|
||||
|
||||
result += get_soci_sources('classic')
|
||||
result += get_common_sources(toolchain)
|
||||
@@ -804,6 +912,11 @@ def get_unity_sources(toolchain):
|
||||
'src/ripple/unity/unl.cpp',
|
||||
)
|
||||
|
||||
if use_shp(toolchain):
|
||||
cc_flags = {'CCFLAGS': ['--system-header-prefix=rocksdb2']}
|
||||
else:
|
||||
cc_flags = {}
|
||||
|
||||
append_sources(
|
||||
result,
|
||||
'src/ripple/unity/nodestore.cpp',
|
||||
@@ -811,7 +924,8 @@ def get_unity_sources(toolchain):
|
||||
'src/rocksdb2/include',
|
||||
'src/snappy/snappy',
|
||||
'src/snappy/config',
|
||||
])
|
||||
],
|
||||
**cc_flags)
|
||||
|
||||
result += get_soci_sources('unity')
|
||||
result += get_common_sources(toolchain)
|
||||
@@ -852,6 +966,13 @@ def should_prepare_targets(style, toolchain, variant):
|
||||
if should_prepare_target(t, style, toolchain, variant):
|
||||
return True
|
||||
|
||||
def should_link_static():
|
||||
"""
|
||||
Return True if libraries should be linked statically
|
||||
|
||||
"""
|
||||
return GetOption('static')
|
||||
|
||||
def should_build_ninja(style, toolchain, variant):
|
||||
"""
|
||||
Return True if a ninja build file should be generated.
|
||||
@@ -921,6 +1042,11 @@ for tu_style in ['classic', 'unity']:
|
||||
'src/ripple/unity/git_id.cpp',
|
||||
**git_commit_tag)
|
||||
|
||||
if use_shp(toolchain):
|
||||
cc_flags = {'CCFLAGS': ['--system-header-prefix=rocksdb2']}
|
||||
else:
|
||||
cc_flags = {}
|
||||
|
||||
object_builder.add_source_files(
|
||||
'src/beast/beast/unity/hash_unity.cpp',
|
||||
'src/ripple/unity/beast.cpp',
|
||||
@@ -929,7 +1055,8 @@ for tu_style in ['classic', 'unity']:
|
||||
'src/ripple/unity/ripple.proto.cpp',
|
||||
'src/ripple/unity/resource.cpp',
|
||||
'src/ripple/unity/server.cpp',
|
||||
'src/ripple/unity/websocket02.cpp'
|
||||
'src/ripple/unity/websocket02.cpp',
|
||||
**cc_flags
|
||||
)
|
||||
|
||||
object_builder.add_source_files(
|
||||
@@ -937,9 +1064,11 @@ for tu_style in ['classic', 'unity']:
|
||||
CCFLAGS = ([] if toolchain == 'msvc' else ['-Wno-array-bounds']))
|
||||
|
||||
if 'gcc' in toolchain:
|
||||
no_uninitialized_warning = {'CCFLAGS': ['-Wno-maybe-uninitialized']}
|
||||
cc_flags = {'CCFLAGS': ['-Wno-maybe-uninitialized']}
|
||||
elif use_shp(toolchain):
|
||||
cc_flags = {'CCFLAGS': ['--system-header-prefix=rocksdb2']}
|
||||
else:
|
||||
no_uninitialized_warning = {}
|
||||
cc_flags = {}
|
||||
|
||||
object_builder.add_source_files(
|
||||
'src/ripple/unity/ed25519.c',
|
||||
@@ -956,7 +1085,7 @@ for tu_style in ['classic', 'unity']:
|
||||
'src/snappy/snappy',
|
||||
'src/snappy/config',
|
||||
],
|
||||
**no_uninitialized_warning
|
||||
**cc_flags
|
||||
)
|
||||
|
||||
object_builder.add_source_files(
|
||||
|
||||
18
appveyor.yml
18
appveyor.yml
@@ -6,22 +6,22 @@ environment:
|
||||
# that it's a small download. We also use appveyor's free cache, avoiding fees
|
||||
# downloading from S3 each time.
|
||||
# TODO: script to create this package.
|
||||
RIPPLED_DEPS_URL: https://github.com/ripple/Downloads/blob/gh-pages/appveyor/rippled_deps15.zip?raw=true
|
||||
RIPPLED_DEPS_URL: https://ripple.github.io/Downloads/appveyor/rippled_deps15.01.zip
|
||||
|
||||
# Other dependencies we just download each time.
|
||||
PIP_URL: https://bootstrap.pypa.io/get-pip.py
|
||||
PYWIN32_URL: https://downloads.sourceforge.net/project/pywin32/pywin32/Build%20219/pywin32-219.win-amd64-py2.7.exe
|
||||
|
||||
# Scons honours these environment variables, setting the include/lib paths.
|
||||
BOOST_ROOT: C:/rippled_deps15/boost
|
||||
OPENSSL_ROOT: C:/rippled_deps15/openssl
|
||||
BOOST_ROOT: C:/rippled_deps15.01/boost
|
||||
OPENSSL_ROOT: C:/rippled_deps15.01/openssl
|
||||
|
||||
os: Visual Studio 2015
|
||||
|
||||
# At the end of each successful build we cache this directory. It must be less
|
||||
# than 100MB total compressed.
|
||||
cache:
|
||||
- "C:\\rippled_deps15"
|
||||
- "C:\\rippled_deps15.01"
|
||||
|
||||
# This means we'll download a zip of the branch we want, rather than the full
|
||||
# history.
|
||||
@@ -29,7 +29,7 @@ shallow_clone: true
|
||||
|
||||
install:
|
||||
# We want easy_install, python and protoc.exe on PATH.
|
||||
- SET PATH=%PYTHON%;%PYTHON%/Scripts;C:/rippled_deps15;%PATH%
|
||||
- SET PATH=%PYTHON%;%PYTHON%/Scripts;C:/rippled_deps15.01;%PATH%
|
||||
|
||||
# `ps` prefix means the command is executed by powershell.
|
||||
- ps: Start-FileDownload $env:PIP_URL
|
||||
@@ -48,17 +48,17 @@ install:
|
||||
# Download dependencies if appveyor didn't restore them from the cache.
|
||||
# Use 7zip to unzip.
|
||||
- ps: |
|
||||
if (-not(Test-Path 'C:/rippled_deps15')) {
|
||||
if (-not(Test-Path 'C:/rippled_deps15.01')) {
|
||||
echo "Download from $env:RIPPLED_DEPS_URL"
|
||||
Start-FileDownload "$env:RIPPLED_DEPS_URL"
|
||||
7z x rippled_deps15.zip -oC:\ -y > $null
|
||||
7z x rippled_deps15.01.zip -oC:\ -y > $null
|
||||
}
|
||||
|
||||
# Newer DEPS include a versions file.
|
||||
# Dump it so we can verify correct behavior.
|
||||
- ps: |
|
||||
if (Test-Path 'C:/rippled_deps15/versions.txt') {
|
||||
cat 'C:/rippled_deps15/versions.txt'
|
||||
if (Test-Path 'C:/rippled_deps15.01/versions.txt') {
|
||||
cat 'C:/rippled_deps15.01/versions.txt'
|
||||
}
|
||||
|
||||
# TODO: This is giving me grief
|
||||
|
||||
@@ -25,10 +25,15 @@ if [[ $TARGET == "coverage" ]]; then
|
||||
# We pass along -p to keep path segments so as to avoid collisions
|
||||
codecov --gcov-args=-p --gcov-source-match='^src/(ripple|beast)'
|
||||
else
|
||||
# Run unittests (under gdb)
|
||||
cat $__dirname/unittests.gdb | gdb \
|
||||
--return-child-result \
|
||||
--args $RIPPLED_PATH --unittest
|
||||
if [[ $CC == "clang" ]]; then
|
||||
# gdb segfaults with a clang build
|
||||
$RIPPLED_PATH --unittest
|
||||
else
|
||||
# Run unittests (under gdb)
|
||||
cat $__dirname/unittests.gdb | gdb \
|
||||
--return-child-result \
|
||||
--args $RIPPLED_PATH --unittest
|
||||
fi
|
||||
fi
|
||||
|
||||
# Run NPM tests
|
||||
|
||||
@@ -9,11 +9,20 @@ do
|
||||
test -x $( type -p ${g}-$GCC_VER )
|
||||
ln -sv $(type -p ${g}-$GCC_VER) $HOME/bin/${g}
|
||||
done
|
||||
for c in clang clang++
|
||||
do
|
||||
test -x $( type -p ${c}-$CLANG_VER )
|
||||
ln -sv $(type -p ${c}-$CLANG_VER) $HOME/bin/${c}
|
||||
done
|
||||
export PATH=$PWD/bin:$PATH
|
||||
|
||||
# What versions are we ACTUALLY running?
|
||||
g++ -v
|
||||
clang -v
|
||||
if [ -x $HOME/bin/g++ ]; then
|
||||
$HOME/bin/g++ -v
|
||||
fi
|
||||
if [ -x $HOME/bin/clang ]; then
|
||||
$HOME/bin/clang -v
|
||||
fi
|
||||
# Avoid `spurious errors` caused by ~/.npm permission issues
|
||||
# Does it already exist? Who owns? What permissions?
|
||||
ls -lah ~/.npm || mkdir ~/.npm
|
||||
|
||||
19
circle.yml
19
circle.yml
@@ -3,28 +3,33 @@ machine:
|
||||
- docker
|
||||
dependencies:
|
||||
pre:
|
||||
- sudo apt-add-repository -y 'deb http://llvm.org/apt/precise/ llvm-toolchain-precise-3.4 main'
|
||||
- sudo apt-add-repository -y 'deb http://llvm.org/apt/precise/ llvm-toolchain-precise-3.6 main'
|
||||
- sudo apt-add-repository -y ppa:ubuntu-toolchain-r/test
|
||||
- sudo add-apt-repository -y ppa:afrank/boost
|
||||
- wget -q -O - http://llvm.org/apt/llvm-snapshot.gpg.key | sudo apt-key add -
|
||||
- sudo apt-get update -qq
|
||||
- sudo apt-get purge -qq libboost1.48-dev
|
||||
- sudo apt-get install -qq libboost1.57-all-dev
|
||||
- sudo apt-get install -qq clang-3.4 gcc-4.8 libobjc-4.8-dev libgcc-4.8-dev libstdc++-4.8-dev libclang1-3.4 libgcc1 libgomp1 libstdc++6 scons protobuf-compiler libprotobuf-dev libssl-dev exuberant-ctags
|
||||
- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 99 --slave /usr/bin/g++ g++ /usr/bin/g++-4.8
|
||||
- sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-3.4 99 --slave /usr/bin/clang++ clang++ /usr/bin/clang++-3.4
|
||||
- sudo apt-get install -qq clang-3.6 gcc-5 g++-5 libobjc-5-dev libgcc-5-dev libstdc++-5-dev libclang1-3.6 libgcc1 libgomp1 libstdc++6 scons protobuf-compiler libprotobuf-dev libssl-dev exuberant-ctags
|
||||
- lsb_release -a
|
||||
- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 99
|
||||
- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 99
|
||||
- sudo update-alternatives --force --install /usr/bin/clang clang /usr/bin/clang-3.6 99 --slave /usr/bin/clang++ clang++ /usr/bin/clang++-3.6
|
||||
- gcc --version
|
||||
- clang --version
|
||||
- clang++ --version
|
||||
test:
|
||||
pre:
|
||||
- scons clang.debug
|
||||
override:
|
||||
- | # create gdb script
|
||||
echo "set env MALLOC_CHECK_=3" > script.gdb
|
||||
echo "set env MALLOC_CHECK_=3" > script.gdb
|
||||
echo "run" >> script.gdb
|
||||
echo "backtrace full" >> script.gdb
|
||||
echo "backtrace full" >> script.gdb
|
||||
# gdb --help
|
||||
- cat script.gdb | gdb --ex 'set print thread-events off' --return-child-result --args build/clang.debug/rippled --unittest
|
||||
# gdb segfaults
|
||||
# - cat script.gdb | gdb --ex 'set print thread-events off' --return-child-result --args build/clang.debug/rippled --unittest
|
||||
- build/clang.debug/rippled --unittest
|
||||
- npm install
|
||||
# Use build/(gcc|clang).debug/rippled
|
||||
- |
|
||||
|
||||
@@ -212,6 +212,29 @@
|
||||
# in the submitted JSON for any administrative command requests when
|
||||
# invoking JSON-RPC commands on remote servers.
|
||||
#
|
||||
# secure_gateway = [ IP, IP, IP, ... ]
|
||||
#
|
||||
# A comma-separated list of IP addresses.
|
||||
#
|
||||
# When set, allows the specified IP addresses to pass HTTP headers
|
||||
# containing username and remote IP address for each session. If a
|
||||
# non-empty username is passed in this way, then resource controls
|
||||
# such as often resulting in "tooBusy" errors will be lifted. However,
|
||||
# administrative RPC commands such as "stop" will not be allowed.
|
||||
# The HTTP headers that secure_gateway hosts can set are X-User and
|
||||
# X-Forwarded-For. Only the X-User header affects resource controls.
|
||||
# However, both header values are logged to help identify user activity.
|
||||
# If no X-User header is passed, or if its value is empty, then
|
||||
# resource controls will default to those for non-administrative users.
|
||||
#
|
||||
# The secure_gateway IP addresses are intended to represent
|
||||
# proxies. Since rippled trusts these hosts, they must be
|
||||
# responsible for properly authenticating the remote user.
|
||||
#
|
||||
# The same IP address cannot be used in both "admin" and "secure_gateway"
|
||||
# lists for the same port. In this case, rippled will abort with an error
|
||||
# message to the console shortly after startup
|
||||
#
|
||||
# ssl_key = <filename>
|
||||
# ssl_cert = <filename>
|
||||
# ssl_chain = <filename>
|
||||
@@ -293,6 +316,7 @@
|
||||
# [ips]
|
||||
# r.ripple.com 51235
|
||||
#
|
||||
# The default is: [ips_fixed] addresses (if present) or r.ripple.com 51235
|
||||
#
|
||||
#
|
||||
# [ips_fixed]
|
||||
@@ -372,6 +396,39 @@
|
||||
# Peers will use this information to reject attempt to proxy
|
||||
# connections to or from this server.
|
||||
#
|
||||
# ip_limit = <number>
|
||||
#
|
||||
# The maximum number of incoming peer connections allowed by a single
|
||||
# IP that isn't classified as "private" in RFC1918. The implementation
|
||||
# imposes some hard and soft upper limits on this value to prevent a
|
||||
# single host from consuming all inbound slots. If the value is not
|
||||
# present the server will autoconfigure an appropriate limit.
|
||||
#
|
||||
#
|
||||
#
|
||||
# [transaction_queue] EXPERIMENTAL
|
||||
#
|
||||
# This section is EXPERIMENTAL, and should not be
|
||||
# present for production configuration settings.
|
||||
#
|
||||
# A set of key/value pair parameters to tune the performance of the
|
||||
# transaction queue.
|
||||
#
|
||||
# ledgers_in_queue = <number>
|
||||
#
|
||||
# The queue will be limited to this <number> of average ledgers'
|
||||
# worth of transactions. If the queue fills up, the transactions
|
||||
# with the lowest fees will be dropped from the queue any time a
|
||||
# transaction with a higher fee level is added. Default: 20.
|
||||
#
|
||||
# retry_sequence_percent = <number>
|
||||
#
|
||||
# If a client resubmits a transaction, the new transaction's fee
|
||||
# must be more than <number> percent higher than the original
|
||||
# transaction's fee, or meet the current open ledger fee to be
|
||||
# considered. Default: 125.
|
||||
#
|
||||
#
|
||||
#
|
||||
#-------------------------------------------------------------------------------
|
||||
#
|
||||
@@ -503,6 +560,9 @@
|
||||
# [path_search_max]
|
||||
# When searching for paths, the minimum and maximum search aggressiveness.
|
||||
#
|
||||
# If you do not need pathfinding, you can set path_search_max to zero to
|
||||
# disable it and avoid some expensive bookkeeping.
|
||||
#
|
||||
# The default for 'path_search_fast' is 2. The default for 'path_search_max' is 10.
|
||||
#
|
||||
# [path_search_old]
|
||||
@@ -667,7 +727,7 @@
|
||||
#
|
||||
# [debug_logfile]
|
||||
#
|
||||
# Specifies were a debug logfile is kept. By default, no debug log is kept.
|
||||
# Specifies where a debug logfile is kept. By default, no debug log is kept.
|
||||
# Unless absolute, the path is relative the directory containing this file.
|
||||
#
|
||||
# Example: debug.log
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
"simple-jsonrpc": "~0.0.2"
|
||||
},
|
||||
"scripts": {
|
||||
"pretest": "node test/pretest.js",
|
||||
"test": "mocha test/websocket-test.js test/server-test.js test/*-test.{js,coffee}"
|
||||
},
|
||||
"repository": {
|
||||
|
||||
@@ -164,16 +164,9 @@
|
||||
#define RIPPLE_SINGLE_IO_SERVICE_THREAD 0
|
||||
#endif
|
||||
|
||||
/** Config: RIPPLE_ENABLE_TICKETS
|
||||
Enables processing of ticket transactions
|
||||
*/
|
||||
#ifndef RIPPLE_ENABLE_TICKETS
|
||||
#define RIPPLE_ENABLE_TICKETS 0
|
||||
#endif
|
||||
|
||||
// Uses OpenSSL instead of alternatives
|
||||
#ifndef RIPPLE_USE_OPENSSL
|
||||
#define RIPPLE_USE_OPENSSL 0
|
||||
#define RIPPLE_USE_OPENSSL 1
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -26,8 +26,6 @@
|
||||
|
||||
#include <beast/Config.h>
|
||||
|
||||
#include <beast/utility/noexcept.h>
|
||||
|
||||
#include <cmath>
|
||||
#include <cstdint>
|
||||
#include <algorithm>
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
#include <beast/threads/TryLockGuard.h>
|
||||
#include <beast/threads/SharedLockGuard.h>
|
||||
#include <beast/threads/SharedMutexAdapter.h>
|
||||
#include <beast/threads/SharedData.h>
|
||||
#include <beast/threads/SpinLock.h>
|
||||
#include <beast/threads/Stoppable.h>
|
||||
#include <beast/threads/Thread.h>
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
#include <boost/asio/detail/handler_invoke_helpers.hpp>
|
||||
|
||||
#include <functional>
|
||||
#include <beast/cxx14/type_traits.h> // <type_traits>
|
||||
#include <beast/cxx14/utility.h> // <utility>
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
|
||||
namespace beast {
|
||||
namespace asio {
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <cassert>
|
||||
#include <memory>
|
||||
#include <exception>
|
||||
#include <beast/cxx14/type_traits.h> // <type_traits>
|
||||
#include <type_traits>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <beast/cxx14/type_traits.h> // <type_traits>
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
#include <beast/Config.h>
|
||||
#include <beast/strings/String.h>
|
||||
|
||||
#include <beast/utility/noexcept.h>
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
|
||||
#include <beast/Config.h>
|
||||
|
||||
#include <beast/utility/noexcept.h>
|
||||
#include <ctime>
|
||||
#include <locale>
|
||||
|
||||
|
||||
@@ -22,5 +22,4 @@
|
||||
#ifndef BEAST_CONFIG_COMPILER_VISUALC_H_INCLUDED
|
||||
#define BEAST_CONFIG_COMPILER_VISUALC_H_INCLUDED
|
||||
|
||||
#include <beast/utility/noexcept.h>
|
||||
#endif
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
#include <iterator>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <type_traits>
|
||||
#include <vector>
|
||||
#include <beast/cxx14/type_traits.h> // <type_traits>
|
||||
|
||||
namespace beast {
|
||||
|
||||
|
||||
@@ -25,15 +25,17 @@
|
||||
#include <beast/container/aged_container.h>
|
||||
#include <beast/chrono/abstract_clock.h>
|
||||
#include <beast/utility/empty_base_optimization.h>
|
||||
#include <beast/utility/empty_base_optimization.h>
|
||||
#include <beast/cxx14/type_traits.h>
|
||||
#include <boost/intrusive/list.hpp>
|
||||
#include <boost/intrusive/set.hpp>
|
||||
#include <boost/version.hpp>
|
||||
#include <beast/cxx14/algorithm.h> // <algorithm>
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
#include <initializer_list>
|
||||
#include <iterator>
|
||||
#include <memory>
|
||||
#include <beast/cxx14/type_traits.h> // <type_traits>
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
|
||||
namespace beast {
|
||||
|
||||
@@ -27,12 +27,12 @@
|
||||
#include <beast/utility/empty_base_optimization.h>
|
||||
#include <boost/intrusive/list.hpp>
|
||||
#include <boost/intrusive/unordered_set.hpp>
|
||||
#include <beast/cxx14/algorithm.h> // <algorithm>
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
#include <initializer_list>
|
||||
#include <iterator>
|
||||
#include <memory>
|
||||
#include <beast/cxx14/type_traits.h> // <type_traits>
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
|
||||
/*
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
|
||||
#include <beast/crypto/secure_erase.h>
|
||||
#include <beast/hash/endian.h>
|
||||
#include <beast/utility/noexcept.h>
|
||||
#include <type_traits>
|
||||
#include <array>
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
#ifndef BEAST_CRYPTO_RIPEMD_CONTEXT_H_INCLUDED
|
||||
#define BEAST_CRYPTO_RIPEMD_CONTEXT_H_INCLUDED
|
||||
|
||||
#include <beast/utility/noexcept.h>
|
||||
#include <array>
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
#ifndef BEAST_CRYPTO_SHA512_CONTEXT_H_INCLUDED
|
||||
#define BEAST_CRYPTO_SHA512_CONTEXT_H_INCLUDED
|
||||
|
||||
#include <beast/utility/noexcept.h>
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
|
||||
|
||||
@@ -1,94 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
This file is part of Beast: https://github.com/vinniefalco/Beast
|
||||
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
|
||||
|
||||
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 BEAST_CXX14_ALGORITHM_H_INCLUDED
|
||||
#define BEAST_CXX14_ALGORITHM_H_INCLUDED
|
||||
|
||||
#include <beast/cxx14/config.h>
|
||||
#include <beast/cxx14/functional.h>
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#if ! BEAST_NO_CXX14_EQUAL
|
||||
|
||||
namespace std {
|
||||
|
||||
namespace detail {
|
||||
|
||||
template <class Pred, class FwdIt1, class FwdIt2>
|
||||
bool equal (FwdIt1 first1, FwdIt1 last1,
|
||||
FwdIt2 first2, FwdIt2 last2, Pred pred,
|
||||
std::input_iterator_tag, std::input_iterator_tag)
|
||||
{
|
||||
for (; first1 != last1 && first2 != last2; ++first1, ++first2)
|
||||
if (! pred (*first1, *first2))
|
||||
return false;
|
||||
return first1 == last1 && first2 == last2;
|
||||
}
|
||||
|
||||
template <class Pred, class RanIt1, class RanIt2>
|
||||
bool equal (RanIt1 first1, RanIt1 last1,
|
||||
RanIt2 first2, RanIt2 last2, Pred pred,
|
||||
random_access_iterator_tag,
|
||||
random_access_iterator_tag )
|
||||
{
|
||||
if (std::distance (first1, last1) !=
|
||||
std::distance (first2, last2))
|
||||
return false;
|
||||
for (; first1 != last1; ++first1, ++first2)
|
||||
if (! pred (*first1, *first2))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/** C++14 implementation of std::equal. */
|
||||
/** @{ */
|
||||
template <class FwdIt1, class FwdIt2>
|
||||
bool equal (FwdIt1 first1, FwdIt1 last1,
|
||||
FwdIt2 first2, FwdIt2 last2)
|
||||
{
|
||||
return std::detail::equal (first1, last1,
|
||||
first2, last2, std::equal_to <void>(),
|
||||
typename std::iterator_traits <
|
||||
FwdIt1>::iterator_category(),
|
||||
typename std::iterator_traits <
|
||||
FwdIt2>::iterator_category());
|
||||
}
|
||||
|
||||
template <class FwdIt1, class FwdIt2, class Pred>
|
||||
bool equal (FwdIt1 first1, FwdIt1 last1,
|
||||
FwdIt2 first2, FwdIt2 last2, Pred pred)
|
||||
{
|
||||
return std::detail::equal <
|
||||
typename std::add_lvalue_reference <Pred>::type> (
|
||||
first1, last1, first2, last2, pred,
|
||||
typename std::iterator_traits <
|
||||
FwdIt1>::iterator_category(),
|
||||
typename std::iterator_traits <
|
||||
FwdIt2>::iterator_category());
|
||||
}
|
||||
/** @} */
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,90 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
This file is part of Beast: https://github.com/vinniefalco/Beast
|
||||
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
|
||||
|
||||
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 BEAST_CXX14_CONFIG_H_INCLUDED
|
||||
#define BEAST_CXX14_CONFIG_H_INCLUDED
|
||||
|
||||
#include <ciso646> // detect libc++ verison
|
||||
|
||||
// Sets C++14 compatibility configuration macros based on build environment
|
||||
|
||||
// Disables beast c++14 compatibility additions when set to 1
|
||||
// Note, some compatibilty features are enabled or disabled individually.
|
||||
//
|
||||
#ifndef BEAST_NO_CXX14_COMPATIBILITY
|
||||
# ifdef _MSC_VER
|
||||
# define BEAST_NO_CXX14_COMPATIBILITY 1
|
||||
# elif defined(__clang__) && defined(_LIBCPP_VERSION) && __cplusplus >= 201402
|
||||
# define BEAST_NO_CXX14_COMPATIBILITY 1
|
||||
# else
|
||||
# define BEAST_NO_CXX14_COMPATIBILITY 0
|
||||
# endif
|
||||
#endif
|
||||
|
||||
// Disables beast's std::make_unique
|
||||
#ifndef BEAST_NO_CXX14_MAKE_UNIQUE
|
||||
# ifdef _MSC_VER
|
||||
# define BEAST_NO_CXX14_MAKE_UNIQUE 1
|
||||
# elif defined(__clang__) && defined(_LIBCPP_VERSION) && __cplusplus >= 201402
|
||||
# define BEAST_NO_CXX14_MAKE_UNIQUE 1
|
||||
# else
|
||||
# define BEAST_NO_CXX14_MAKE_UNIQUE 0
|
||||
# endif
|
||||
#endif
|
||||
|
||||
// Disables beast's std::equal safe iterator overloads
|
||||
#ifndef BEAST_NO_CXX14_EQUAL
|
||||
# if defined(_MSC_VER) && _MSC_VER >= 1900
|
||||
# define BEAST_NO_CXX14_EQUAL 1
|
||||
# elif defined(_MSC_VER)
|
||||
# define BEAST_NO_CXX14_EQUAL 0
|
||||
# elif defined(__clang__) && defined(_LIBCPP_VERSION) && __cplusplus >= 201402
|
||||
# define BEAST_NO_CXX14_EQUAL 1
|
||||
# else
|
||||
# define BEAST_NO_CXX14_EQUAL 0
|
||||
# endif
|
||||
#endif
|
||||
|
||||
// Disables beast's std::integer_sequence
|
||||
#ifndef BEAST_NO_CXX14_INTEGER_SEQUENCE
|
||||
# if defined(_MSC_VER) && _MSC_VER >= 1900
|
||||
# define BEAST_NO_CXX14_INTEGER_SEQUENCE 1
|
||||
# elif defined(_MSC_VER)
|
||||
# define BEAST_NO_CXX14_INTEGER_SEQUENCE 0
|
||||
# elif defined(__clang__) && defined(_LIBCPP_VERSION) && __cplusplus >= 201402
|
||||
# define BEAST_NO_CXX14_INTEGER_SEQUENCE 1
|
||||
# else
|
||||
# define BEAST_NO_CXX14_INTEGER_SEQUENCE 0
|
||||
# endif
|
||||
#endif
|
||||
|
||||
// Disables beast's std::make_reverse_iterator
|
||||
#ifndef BEAST_NO_CXX14_MAKE_REVERSE_ITERATOR
|
||||
# if defined(_MSC_VER) && _MSC_VER >= 1900
|
||||
# define BEAST_NO_CXX14_MAKE_REVERSE_ITERATOR 1
|
||||
# elif defined(_MSC_VER)
|
||||
# define BEAST_NO_CXX14_MAKE_REVERSE_ITERATOR 0
|
||||
# elif defined(__clang__) && defined(_LIBCPP_VERSION) && __cplusplus >= 201402
|
||||
# define BEAST_NO_CXX14_MAKE_REVERSE_ITERATOR 1
|
||||
# else
|
||||
# define BEAST_NO_CXX14_MAKE_REVERSE_ITERATOR 0
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,53 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
This file is part of Beast: https://github.com/vinniefalco/Beast
|
||||
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
|
||||
|
||||
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 BEAST_CXX14_FUNCTIONAL_H_INCLUDED
|
||||
#define BEAST_CXX14_FUNCTIONAL_H_INCLUDED
|
||||
|
||||
#include <beast/cxx14/config.h>
|
||||
|
||||
#include <functional>
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
|
||||
#if ! BEAST_NO_CXX14_COMPATIBILITY
|
||||
|
||||
namespace std {
|
||||
|
||||
// C++14 implementation of std::equal_to <void> specialization.
|
||||
// This supports heterogeneous comparisons.
|
||||
template <>
|
||||
struct equal_to <void>
|
||||
{
|
||||
// VFALCO NOTE Its not clear how to support is_transparent pre c++14
|
||||
using is_transparent = std::true_type;
|
||||
|
||||
template <class T, class U>
|
||||
auto operator() (T&& lhs, U&& rhs) const ->
|
||||
decltype (std::forward <T> (lhs) == std::forward <U> (rhs))
|
||||
{
|
||||
return std::forward <T> (lhs) == std::forward <U> (rhs);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,45 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
This file is part of Beast: https://github.com/vinniefalco/Beast
|
||||
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
|
||||
|
||||
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 BEAST_CXX14_ITERATOR_H_INCLUDED
|
||||
#define BEAST_CXX14_ITERATOR_H_INCLUDED
|
||||
|
||||
#include <beast/cxx14/config.h>
|
||||
|
||||
#include <iterator>
|
||||
|
||||
#if ! BEAST_NO_CXX14_MAKE_REVERSE_ITERATOR
|
||||
|
||||
namespace std {
|
||||
|
||||
// C++14 implementation of std::make_reverse_iterator to allow creation of a
|
||||
// reverse iterator from a given iterator.
|
||||
template <class Iter>
|
||||
inline
|
||||
reverse_iterator<Iter>
|
||||
make_reverse_iterator(Iter i)
|
||||
{
|
||||
return reverse_iterator<Iter>(i);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,39 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
This file is part of Beast: https://github.com/vinniefalco/Beast
|
||||
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
|
||||
|
||||
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 BEAST_CXX14_MEMORY_H_INCLUDED
|
||||
#define BEAST_CXX14_MEMORY_H_INCLUDED
|
||||
|
||||
#include <beast/cxx14/config.h>
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace std {
|
||||
|
||||
#if ! BEAST_NO_CXX14_MAKE_UNIQUE
|
||||
template <class T, class... Args>
|
||||
std::unique_ptr <T> make_unique (Args&&... args)
|
||||
{
|
||||
return std::unique_ptr <T> (new T (std::forward <Args> (args)...));
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,113 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
This file is part of Beast: https://github.com/vinniefalco/Beast
|
||||
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
|
||||
|
||||
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.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#if BEAST_INCLUDE_BEASTCONFIG
|
||||
#include <BeastConfig.h>
|
||||
#endif
|
||||
|
||||
#if ! BEAST_NO_CXX14_INTEGER_SEQUENCE
|
||||
|
||||
#include <beast/cxx14/utility.h>
|
||||
|
||||
#include <beast/unit_test/suite.h>
|
||||
|
||||
namespace beast {
|
||||
namespace asio {
|
||||
|
||||
class integer_sequence_test : public unit_test::suite
|
||||
{
|
||||
public:
|
||||
template <class AtContainer, class T, T... I>
|
||||
static
|
||||
auto
|
||||
extract (AtContainer const& t,
|
||||
std::integer_sequence <T, I...>) ->
|
||||
decltype (std::make_tuple (std::get <I> (t)...))
|
||||
{
|
||||
return std::make_tuple (std::get <I> (t)...);
|
||||
}
|
||||
|
||||
void run()
|
||||
{
|
||||
// Code from
|
||||
// http://llvm.org/svn/llvm-project/libcxx/trunk/test/utilities/intseq/intseq.general/integer_seq.pass.cpp
|
||||
|
||||
// Make a couple of sequences
|
||||
using int3 = std::make_integer_sequence<int, 3>; // generates int: 0,1,2
|
||||
using size7 = std::make_integer_sequence<size_t, 7>; // generates size_t: 0,1,2,3,4,5,6
|
||||
using size4 = std::make_index_sequence<4>; // generates size_t: 0,1,2,3
|
||||
using size2 = std::index_sequence_for<int, size_t>; // generates size_t: 0,1
|
||||
using intmix = std::integer_sequence<int, 9, 8, 7, 2>; // generates int: 9,8,7,2
|
||||
using sizemix = std::index_sequence<1, 1, 2, 3, 5>; // generates size_t: 1,1,2,3,5
|
||||
|
||||
// Make sure they're what we expect
|
||||
static_assert ( std::is_same <int3::value_type, int>::value, "int3 type wrong" );
|
||||
static_assert ( int3::static_size == 3, "int3 size wrong" );
|
||||
|
||||
static_assert ( std::is_same <size7::value_type, size_t>::value, "size7 type wrong" );
|
||||
static_assert ( size7::static_size == 7, "size7 size wrong" );
|
||||
|
||||
static_assert ( std::is_same <size4::value_type, size_t>::value, "size4 type wrong" );
|
||||
static_assert ( size4::static_size == 4, "size4 size wrong" );
|
||||
|
||||
static_assert ( std::is_same <size2::value_type, size_t>::value, "size2 type wrong" );
|
||||
static_assert ( size2::static_size == 2, "size2 size wrong" );
|
||||
|
||||
static_assert ( std::is_same <intmix::value_type, int>::value, "intmix type wrong" );
|
||||
static_assert ( intmix::static_size == 4, "intmix size wrong" );
|
||||
|
||||
static_assert ( std::is_same <sizemix::value_type, size_t>::value, "sizemix type wrong" );
|
||||
static_assert ( sizemix::static_size == 5, "sizemix size wrong" );
|
||||
|
||||
auto tup = std::make_tuple ( 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20 );
|
||||
|
||||
// Use them
|
||||
auto t3 = extract ( tup, int3() );
|
||||
static_assert ( std::tuple_size<decltype(t3)>::value == int3::static_size, "t3 size wrong");
|
||||
expect ( t3 == std::make_tuple ( 10, 11, 12 ));
|
||||
|
||||
auto t7 = extract ( tup, size7 ());
|
||||
static_assert ( std::tuple_size<decltype(t7)>::value == size7::static_size, "t7 size wrong");
|
||||
expect ( t7 == std::make_tuple ( 10, 11, 12, 13, 14, 15, 16 ));
|
||||
|
||||
auto t4 = extract ( tup, size4 ());
|
||||
static_assert ( std::tuple_size<decltype(t4)>::value == size4::static_size, "t4 size wrong");
|
||||
expect ( t4 == std::make_tuple ( 10, 11, 12, 13 ));
|
||||
|
||||
auto t2 = extract ( tup, size2 ());
|
||||
static_assert ( std::tuple_size<decltype(t2)>::value == size2::static_size, "t2 size wrong");
|
||||
expect ( t2 == std::make_tuple ( 10, 11 ));
|
||||
|
||||
auto tintmix = extract ( tup, intmix ());
|
||||
static_assert ( std::tuple_size<decltype(tintmix)>::value == intmix::static_size, "tintmix size wrong");
|
||||
expect ( tintmix == std::make_tuple ( 19, 18, 17, 12 ));
|
||||
|
||||
auto tsizemix = extract ( tup, sizemix ());
|
||||
static_assert ( std::tuple_size<decltype(tsizemix)>::value == sizemix::static_size, "tsizemix size wrong");
|
||||
expect ( tsizemix == std::make_tuple ( 11, 11, 12, 13, 15 ));
|
||||
pass();
|
||||
}
|
||||
};
|
||||
|
||||
BEAST_DEFINE_TESTSUITE(integer_sequence,cxx14,beast);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -20,8 +20,6 @@
|
||||
#ifndef BEAST_CXX14_TYPE_TRAITS_H_INCLUDED
|
||||
#define BEAST_CXX14_TYPE_TRAITS_H_INCLUDED
|
||||
|
||||
#include <beast/cxx14/config.h>
|
||||
|
||||
#include <tuple>
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
@@ -43,105 +41,6 @@ struct is_constructible <pair <T, U>>
|
||||
{
|
||||
};
|
||||
|
||||
namespace detail {
|
||||
|
||||
template <bool...>
|
||||
struct compile_time_all;
|
||||
|
||||
template <>
|
||||
struct compile_time_all <>
|
||||
{
|
||||
static const bool value = true;
|
||||
};
|
||||
|
||||
template <bool Arg0, bool ... Argn>
|
||||
struct compile_time_all <Arg0, Argn...>
|
||||
{
|
||||
static const bool value =
|
||||
Arg0 && compile_time_all <Argn...>::value;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
template <class ...T>
|
||||
struct is_constructible <tuple <T...>>
|
||||
: integral_constant <bool,
|
||||
detail::compile_time_all <
|
||||
is_default_constructible <T>::value...>::value>
|
||||
{
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
#if ! BEAST_NO_CXX14_COMPATIBILITY
|
||||
|
||||
// From http://llvm.org/svn/llvm-project/libcxx/trunk/include/type_traits
|
||||
|
||||
// const-volatile modifications:
|
||||
template <class T>
|
||||
using remove_const_t = typename remove_const<T>::type; // C++14
|
||||
template <class T>
|
||||
using remove_volatile_t = typename remove_volatile<T>::type; // C++14
|
||||
template <class T>
|
||||
using remove_cv_t = typename remove_cv<T>::type; // C++14
|
||||
template <class T>
|
||||
using add_const_t = typename add_const<T>::type; // C++14
|
||||
template <class T>
|
||||
using add_volatile_t = typename add_volatile<T>::type; // C++14
|
||||
template <class T>
|
||||
using add_cv_t = typename add_cv<T>::type; // C++14
|
||||
|
||||
// reference modifications:
|
||||
template <class T>
|
||||
using remove_reference_t = typename remove_reference<T>::type; // C++14
|
||||
template <class T>
|
||||
using add_lvalue_reference_t = typename add_lvalue_reference<T>::type; // C++14
|
||||
template <class T>
|
||||
using add_rvalue_reference_t = typename add_rvalue_reference<T>::type; // C++14
|
||||
|
||||
// sign modifications:
|
||||
template <class T>
|
||||
using make_signed_t = typename make_signed<T>::type; // C++14
|
||||
template <class T>
|
||||
using make_unsigned_t = typename make_unsigned<T>::type; // C++14
|
||||
|
||||
// array modifications:
|
||||
template <class T>
|
||||
using remove_extent_t = typename remove_extent<T>::type; // C++14
|
||||
template <class T>
|
||||
using remove_all_extents_t = typename remove_all_extents<T>::type; // C++14
|
||||
|
||||
// pointer modifications:
|
||||
template <class T>
|
||||
using remove_pointer_t = typename remove_pointer<T>::type; // C++14
|
||||
template <class T>
|
||||
using add_pointer_t = typename add_pointer<T>::type; // C++14
|
||||
|
||||
// other transformations:
|
||||
|
||||
#if 0
|
||||
// This is not easy to implement in C++11
|
||||
template <size_t Len, std::size_t Align=std::alignment_of<max_align_t>::value>
|
||||
using aligned_storage_t = typename aligned_storage<Len,Align>::type; // C++14
|
||||
template <std::size_t Len, class... Types>
|
||||
using aligned_union_t = typename aligned_union<Len,Types...>::type; // C++14
|
||||
#endif
|
||||
|
||||
template <class T>
|
||||
using decay_t = typename decay<T>::type; // C++14
|
||||
template <bool b, class T=void>
|
||||
using enable_if_t = typename enable_if<b,T>::type; // C++14
|
||||
template <bool b, class T, class F>
|
||||
using conditional_t = typename conditional<b,T,F>::type; // C++14
|
||||
template <class... T>
|
||||
using common_type_t = typename common_type<T...>::type; // C++14
|
||||
template <class T>
|
||||
using underlying_type_t = typename underlying_type<T>::type; // C++14
|
||||
template <class F, class... ArgTypes>
|
||||
using result_of_t = typename result_of<F(ArgTypes...)>::type; // C++14
|
||||
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,173 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
This file is part of Beast: https://github.com/vinniefalco/Beast
|
||||
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
|
||||
|
||||
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 BEAST_CXX14_UTILITY_H_INCLUDED
|
||||
#define BEAST_CXX14_UTILITY_H_INCLUDED
|
||||
|
||||
#include <beast/cxx14/config.h>
|
||||
|
||||
#include <cstddef>
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
|
||||
#if ! BEAST_NO_CXX14_INTEGER_SEQUENCE
|
||||
|
||||
namespace std {
|
||||
|
||||
template <class T, T... Ints>
|
||||
struct integer_sequence
|
||||
{
|
||||
using value_type = T;
|
||||
static_assert (is_integral<T>::value,
|
||||
"std::integer_sequence can only be instantiated with an integral type" );
|
||||
|
||||
static const size_t static_size = sizeof...(Ints);
|
||||
|
||||
static /* constexpr */ size_t size() /* noexcept */
|
||||
{
|
||||
return sizeof...(Ints);
|
||||
}
|
||||
};
|
||||
|
||||
template <size_t... Ints>
|
||||
using index_sequence = integer_sequence <size_t, Ints...>;
|
||||
|
||||
namespace detail {
|
||||
|
||||
// This workaround is needed for msvc broken sizeof...
|
||||
template <class... Args>
|
||||
struct sizeof_workaround
|
||||
{
|
||||
static size_t const size = sizeof... (Args);
|
||||
};
|
||||
|
||||
} // detail
|
||||
|
||||
#ifdef _MSC_VER
|
||||
|
||||
// This implementation compiles on MSVC and clang but not gcc
|
||||
|
||||
namespace detail {
|
||||
|
||||
template <class T, unsigned long long N, class Seq>
|
||||
struct make_integer_sequence_unchecked;
|
||||
|
||||
template <class T, unsigned long long N, unsigned long long ...Indices>
|
||||
struct make_integer_sequence_unchecked <
|
||||
T, N, integer_sequence <T, Indices...>>
|
||||
{
|
||||
using type = typename make_integer_sequence_unchecked<
|
||||
T, N-1, integer_sequence<T, N-1, Indices...>>::type;
|
||||
};
|
||||
|
||||
template <class T, unsigned long long ...Indices>
|
||||
struct make_integer_sequence_unchecked <
|
||||
T, 0, integer_sequence<T, Indices...>>
|
||||
{
|
||||
using type = integer_sequence <T, Indices...>;
|
||||
};
|
||||
|
||||
template <class T, T N>
|
||||
struct make_integer_sequence_checked
|
||||
{
|
||||
static_assert (is_integral <T>::value,
|
||||
"T must be an integral type");
|
||||
|
||||
static_assert (N >= 0,
|
||||
"N must be non-negative");
|
||||
|
||||
using type = typename make_integer_sequence_unchecked <
|
||||
T, N, integer_sequence<T>>::type;
|
||||
};
|
||||
|
||||
} // detail
|
||||
|
||||
template <class T, T N>
|
||||
using make_integer_sequence =
|
||||
typename detail::make_integer_sequence_checked <T, N>::type;
|
||||
|
||||
template <size_t N>
|
||||
using make_index_sequence = make_integer_sequence <size_t, N>;
|
||||
|
||||
template <class... Args>
|
||||
using index_sequence_for =
|
||||
make_index_sequence <detail::sizeof_workaround <Args...>::size>;
|
||||
|
||||
#else
|
||||
|
||||
// This implementation compiles on gcc but not MSVC
|
||||
|
||||
namespace detail {
|
||||
|
||||
template <size_t... Ints>
|
||||
struct index_tuple
|
||||
{
|
||||
using next = index_tuple <Ints..., sizeof... (Ints)>;
|
||||
|
||||
};
|
||||
|
||||
template <size_t N>
|
||||
struct build_index_tuple
|
||||
{
|
||||
using type = typename build_index_tuple <N-1>::type::next;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct build_index_tuple <0>
|
||||
{
|
||||
using type = index_tuple<>;
|
||||
};
|
||||
|
||||
template <class T, T N,
|
||||
class Seq = typename build_index_tuple <N>::type
|
||||
>
|
||||
struct make_integer_sequence;
|
||||
|
||||
template <class T, T N, size_t... Ints>
|
||||
struct make_integer_sequence <T, N, index_tuple <Ints...>>
|
||||
{
|
||||
static_assert (is_integral <T>::value,
|
||||
"T must be an integral type");
|
||||
|
||||
static_assert (N >= 0,
|
||||
"N must be non-negative");
|
||||
|
||||
using type = integer_sequence <T, static_cast <T> (Ints)...>;
|
||||
};
|
||||
|
||||
} // detail
|
||||
|
||||
template <class T, T N>
|
||||
using make_integer_sequence =
|
||||
typename detail::make_integer_sequence <T, N>::type;
|
||||
|
||||
template <size_t N>
|
||||
using make_index_sequence = make_integer_sequence <size_t, N>;
|
||||
|
||||
template <class... Args>
|
||||
using index_sequence_for =
|
||||
make_index_sequence <detail::sizeof_workaround <Args...>::size>;
|
||||
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -21,10 +21,9 @@
|
||||
#ifndef BEAST_HASH_FNV1A_H_INCLUDED
|
||||
#define BEAST_HASH_FNV1A_H_INCLUDED
|
||||
|
||||
#include <beast/utility/noexcept.h>
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <beast/cxx14/type_traits.h> // <type_traits>
|
||||
#include <type_traits>
|
||||
|
||||
namespace beast {
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
#include <beast/config/CompilerConfig.h> // for constexpr
|
||||
#include <beast/hash/endian.h>
|
||||
#include <beast/utility/meta.h>
|
||||
#include <beast/utility/noexcept.h>
|
||||
#include <array>
|
||||
#include <chrono>
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
#include <functional>
|
||||
@@ -37,8 +37,8 @@
|
||||
#include <tuple>
|
||||
#include <unordered_map>
|
||||
#include <unordered_set>
|
||||
#include <beast/cxx14/type_traits.h> // <type_traits>
|
||||
#include <beast/cxx14/utility.h> // <utility>
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
namespace beast {
|
||||
@@ -473,6 +473,24 @@ hash_append (Hasher& h, std::shared_ptr<T> const& p) noexcept
|
||||
hash_append(h, p.get());
|
||||
}
|
||||
|
||||
// chrono
|
||||
|
||||
template <class Hasher, class Rep, class Period>
|
||||
inline
|
||||
void
|
||||
hash_append (Hasher& h, std::chrono::duration<Rep, Period> const& d) noexcept
|
||||
{
|
||||
hash_append(h, d.count());
|
||||
}
|
||||
|
||||
template <class Hasher, class Clock, class Duration>
|
||||
inline
|
||||
void
|
||||
hash_append (Hasher& h, std::chrono::time_point<Clock, Duration> const& tp) noexcept
|
||||
{
|
||||
hash_append(h, tp.time_since_epoch());
|
||||
}
|
||||
|
||||
// variadic
|
||||
|
||||
template <class Hasher, class T0, class T1, class ...T>
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
#ifndef BEAST_HASH_SIPHASH_H_INCLUDED
|
||||
#define BEAST_HASH_SIPHASH_H_INCLUDED
|
||||
|
||||
#include <beast/utility/noexcept.h>
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
|
||||
|
||||
@@ -28,8 +28,7 @@
|
||||
|
||||
#include <beast/hash/endian.h>
|
||||
#include <beast/hash/impl/xxhash.h>
|
||||
#include <beast/utility/noexcept.h>
|
||||
#include <beast/cxx14/type_traits.h> // <type_traits>
|
||||
#include <type_traits>
|
||||
#include <cstddef>
|
||||
|
||||
namespace beast {
|
||||
|
||||
@@ -52,22 +52,7 @@ public:
|
||||
URL& operator= (URL const& other) = default;
|
||||
|
||||
/** Move construct a URL. */
|
||||
#ifdef _MSC_VER
|
||||
URL (URL&& other)
|
||||
: m_scheme(std::move(other.m_scheme))
|
||||
, m_host(std::move(other.m_host))
|
||||
, m_port(other.m_port)
|
||||
, m_port_string(std::move(other.m_port_string))
|
||||
, m_path(std::move(other.m_path))
|
||||
, m_query(std::move(other.m_query))
|
||||
, m_fragment(std::move(other.m_fragment))
|
||||
, m_userinfo(std::move(other.m_userinfo))
|
||||
{
|
||||
}
|
||||
|
||||
#else
|
||||
URL (URL&& other) = default;
|
||||
#endif
|
||||
|
||||
/** Returns `true` if this is an empty URL. */
|
||||
bool
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <beast/utility/noexcept.h>
|
||||
|
||||
namespace beast {
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <boost/asio/buffer.hpp>
|
||||
#include <boost/asio/streambuf.hpp>
|
||||
#include <boost/optional.hpp>
|
||||
#include <beast/cxx14/memory.h> // <memory>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
namespace beast {
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <cassert>
|
||||
#include <cstddef>
|
||||
#include <iterator>
|
||||
#include <beast/cxx14/type_traits.h> // <type_traits>
|
||||
#include <type_traits>
|
||||
|
||||
namespace beast {
|
||||
namespace http {
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
#include <beast/http/basic_parser.h>
|
||||
#include <beast/http/impl/joyent_parser.h>
|
||||
#include <beast/http/rfc2616.h>
|
||||
#include <beast/utility/noexcept.h>
|
||||
#include <boost/system/error_code.hpp>
|
||||
|
||||
namespace beast {
|
||||
|
||||
@@ -76,16 +76,9 @@ public:
|
||||
template <class = void>
|
||||
message();
|
||||
|
||||
#if defined(_MSC_VER) && _MSC_VER <= 1800
|
||||
message (message&& other);
|
||||
message& operator= (message&& other);
|
||||
|
||||
#else
|
||||
message (message&& other) = default;
|
||||
message& operator= (message&& other) = default;
|
||||
|
||||
#endif
|
||||
|
||||
// Memberspace
|
||||
beast::http::headers headers;
|
||||
|
||||
@@ -220,38 +213,6 @@ message::message()
|
||||
{
|
||||
}
|
||||
|
||||
#if defined(_MSC_VER) && _MSC_VER <= 1800
|
||||
inline
|
||||
message::message (message&& other)
|
||||
: request_ (other.request_)
|
||||
, method_ (std::move(other.method_))
|
||||
, url_ (std::move(other.url_))
|
||||
, status_ (other.status_)
|
||||
, reason_ (std::move(other.reason_))
|
||||
, version_ (other.version_)
|
||||
, keep_alive_ (other.keep_alive_)
|
||||
, upgrade_ (other.upgrade_)
|
||||
, headers (std::move(other.headers))
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
message&
|
||||
message::operator= (message&& other)
|
||||
{
|
||||
request_ = other.request_;
|
||||
method_ = std::move(other.method_);
|
||||
url_ = std::move(other.url_);
|
||||
status_ = other.status_;
|
||||
reason_ = std::move(other.reason_);
|
||||
version_ = other.version_;
|
||||
keep_alive_ = other.keep_alive_;
|
||||
upgrade_ = other.upgrade_;
|
||||
headers = std::move(other.headers);
|
||||
return *this;
|
||||
}
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
template <class Streambuf>
|
||||
|
||||
@@ -66,14 +66,8 @@ public:
|
||||
message_.get().request(request);
|
||||
}
|
||||
|
||||
#if defined(_MSC_VER) && _MSC_VER <= 1800
|
||||
parser& operator= (parser&& other);
|
||||
|
||||
#else
|
||||
parser& operator= (parser&& other) = default;
|
||||
|
||||
#endif
|
||||
|
||||
private:
|
||||
template <class = void>
|
||||
void
|
||||
@@ -141,18 +135,6 @@ private:
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
#if defined(_MSC_VER) && _MSC_VER <= 1800
|
||||
inline
|
||||
parser&
|
||||
parser::operator= (parser&& other)
|
||||
{
|
||||
basic_parser::operator= (std::move(other));
|
||||
message_ = std::move (other.message_);
|
||||
return *this;
|
||||
}
|
||||
#endif
|
||||
|
||||
template <class>
|
||||
void
|
||||
parser::do_start()
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#include <unordered_map>
|
||||
#include <beast/hash/uhash.h>
|
||||
#include <beast/cxx14/memory.h> // <memory>
|
||||
#include <memory>
|
||||
|
||||
namespace beast {
|
||||
namespace insight {
|
||||
|
||||
@@ -20,13 +20,13 @@
|
||||
#include <beast/asio/IPAddressConversion.h>
|
||||
#include <beast/asio/placeholders.h>
|
||||
#include <beast/intrusive/List.h>
|
||||
#include <beast/threads/SharedData.h>
|
||||
#include <boost/asio/ip/tcp.hpp>
|
||||
#include <boost/optional.hpp>
|
||||
#include <cassert>
|
||||
#include <climits>
|
||||
#include <deque>
|
||||
#include <functional>
|
||||
#include <mutex>
|
||||
#include <set>
|
||||
#include <sstream>
|
||||
#include <thread>
|
||||
@@ -192,13 +192,6 @@ private:
|
||||
max_packet_size = 1472
|
||||
};
|
||||
|
||||
struct StateType
|
||||
{
|
||||
List <StatsDMetricBase> metrics;
|
||||
};
|
||||
|
||||
using State = SharedData <StateType>;
|
||||
|
||||
Journal m_journal;
|
||||
IP::Endpoint m_address;
|
||||
std::string m_prefix;
|
||||
@@ -208,7 +201,8 @@ private:
|
||||
boost::asio::deadline_timer m_timer;
|
||||
boost::asio::ip::udp::socket m_socket;
|
||||
std::deque <std::string> m_data;
|
||||
State m_state;
|
||||
std::recursive_mutex metricsLock_;
|
||||
List <StatsDMetricBase> metrics_;
|
||||
|
||||
// Must come last for order of init
|
||||
std::thread m_thread;
|
||||
@@ -288,14 +282,14 @@ public:
|
||||
|
||||
void add (StatsDMetricBase& metric)
|
||||
{
|
||||
State::Access state (m_state);
|
||||
state->metrics.push_back (metric);
|
||||
std::lock_guard<std::recursive_mutex> _(metricsLock_);
|
||||
metrics_.push_back (metric);
|
||||
}
|
||||
|
||||
void remove (StatsDMetricBase& metric)
|
||||
{
|
||||
State::Access state (m_state);
|
||||
state->metrics.erase (state->metrics.iterator_to (metric));
|
||||
std::lock_guard<std::recursive_mutex> _(metricsLock_);
|
||||
metrics_.erase (metrics_.iterator_to (metric));
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -425,11 +419,10 @@ public:
|
||||
return;
|
||||
}
|
||||
|
||||
State::Access state (m_state);
|
||||
std::lock_guard<std::recursive_mutex> _(metricsLock_);
|
||||
|
||||
for (List <StatsDMetricBase>::iterator iter (state->metrics.begin());
|
||||
iter != state->metrics.end(); ++iter)
|
||||
iter->do_process();
|
||||
for (auto& m : metrics_)
|
||||
m.do_process();
|
||||
|
||||
send_buffers ();
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#ifndef BEAST_IS_CALL_POSSIBLE_H_INCLUDED
|
||||
#define BEAST_IS_CALL_POSSIBLE_H_INCLUDED
|
||||
|
||||
#include <beast/cxx14/type_traits.h> // <type_traits>
|
||||
#include <type_traits>
|
||||
|
||||
namespace beast {
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <beast/module/core/diagnostic/FatalError.h>
|
||||
|
||||
#include <atomic>
|
||||
#include <cstdlib>
|
||||
#include <exception>
|
||||
#include <iostream>
|
||||
#include <mutex>
|
||||
@@ -27,49 +28,38 @@
|
||||
namespace beast {
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
[[noreturn]]
|
||||
void
|
||||
FatalError (char const* message, char const* file, int line)
|
||||
FatalError (
|
||||
char const* message,
|
||||
char const* file,
|
||||
int line) noexcept
|
||||
{
|
||||
static std::atomic <int> error_count (0);
|
||||
static std::recursive_mutex gate;
|
||||
static std::mutex gate;
|
||||
|
||||
// We only allow one thread to report a fatal error. Other threads that
|
||||
// encounter fatal errors while we are reporting get blocked here.
|
||||
std::lock_guard<std::recursive_mutex> lock(gate);
|
||||
std::lock_guard<std::mutex> lock(gate);
|
||||
|
||||
// If we encounter a recursive fatal error, then we want to terminate
|
||||
// unconditionally.
|
||||
if (error_count++ != 0)
|
||||
return std::terminate ();
|
||||
std::cerr << "An error has occurred. The application will terminate.\n";
|
||||
|
||||
// We protect this entire block of code since writing to cerr might trigger
|
||||
// exceptions.
|
||||
try
|
||||
if (message != nullptr && message [0] != 0)
|
||||
std::cerr << "Message: " << message << '\n';
|
||||
|
||||
if (file != nullptr && file [0] != 0)
|
||||
std::cerr << " File: " << file << ":" << line << '\n';
|
||||
|
||||
auto const backtrace = getStackBacktrace ();
|
||||
|
||||
if (!backtrace.empty ())
|
||||
{
|
||||
std::cerr << "An error has occurred. The application will terminate.\n";
|
||||
std::cerr << " Stack:" << std::endl;
|
||||
|
||||
if (message != nullptr && message [0] != 0)
|
||||
std::cerr << "Message: " << message << '\n';
|
||||
|
||||
if (file != nullptr && file [0] != 0)
|
||||
std::cerr << " File: " << file << ":" << line << '\n';
|
||||
|
||||
auto const backtrace = getStackBacktrace ();
|
||||
|
||||
if (!backtrace.empty ())
|
||||
{
|
||||
std::cerr << " Stack:" << std::endl;
|
||||
|
||||
for (auto const& frame : backtrace)
|
||||
std::cerr << " " << frame << '\n';
|
||||
}
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
// nothing we can do - just fall through and terminate
|
||||
for (auto const& frame : backtrace)
|
||||
std::cerr << " " << frame << '\n';
|
||||
}
|
||||
|
||||
return std::terminate ();
|
||||
std::abort ();
|
||||
}
|
||||
|
||||
} // beast
|
||||
|
||||
@@ -35,8 +35,12 @@ namespace beast
|
||||
If multiple threads raise an error, only one will succeed while the others
|
||||
will be blocked before the process terminates.
|
||||
*/
|
||||
[[noreturn]]
|
||||
void
|
||||
FatalError (char const* message, char const* file = nullptr, int line = 0);
|
||||
FatalError (
|
||||
char const* message,
|
||||
char const* file = nullptr,
|
||||
int line = 0) noexcept;
|
||||
|
||||
} // beast
|
||||
|
||||
|
||||
@@ -23,8 +23,6 @@
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
#include <beast/utility/noexcept.h>
|
||||
|
||||
namespace beast {
|
||||
|
||||
/** A Semantic Version number.
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#include <beast/cxx14/memory.h> // <memory>
|
||||
#include <memory>
|
||||
|
||||
namespace beast {
|
||||
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#include <beast/utility/static_initializer.h>
|
||||
#include <algorithm>
|
||||
#include <memory>
|
||||
|
||||
@@ -29,8 +28,8 @@ namespace beast {
|
||||
|
||||
File const& File::nonexistent()
|
||||
{
|
||||
static beast::static_initializer<File> instance;
|
||||
return *instance;
|
||||
static File const instance;
|
||||
return instance;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <iterator>
|
||||
#include <limits>
|
||||
#include <string>
|
||||
#include <beast/cxx14/type_traits.h> // <type_traits>
|
||||
#include <type_traits>
|
||||
#include <typeinfo>
|
||||
#include <utility>
|
||||
|
||||
|
||||
@@ -17,8 +17,6 @@
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#include <beast/utility/static_initializer.h>
|
||||
|
||||
namespace beast
|
||||
{
|
||||
|
||||
@@ -47,8 +45,8 @@ public:
|
||||
Manager&
|
||||
instance()
|
||||
{
|
||||
static beast::static_initializer<Manager> m;
|
||||
return *m;
|
||||
static Manager m;
|
||||
return m;
|
||||
}
|
||||
|
||||
// Okay to call on an active timer.
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
#include <beast/net/IPAddressV6.h>
|
||||
#include <beast/hash/hash_append.h>
|
||||
#include <beast/hash/uhash.h>
|
||||
#include <beast/utility/noexcept.h>
|
||||
#include <boost/functional/hash.hpp>
|
||||
#include <cassert>
|
||||
#include <cstdint>
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <stdexcept>
|
||||
#include <beast/cxx14/type_traits.h> // <type_traits>
|
||||
#include <type_traits>
|
||||
|
||||
namespace beast {
|
||||
namespace nudb {
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#include <cstring>
|
||||
#include <memory>
|
||||
#include <stdexcept>
|
||||
#include <beast/cxx14/type_traits.h> // <type_traits>
|
||||
#include <type_traits>
|
||||
|
||||
namespace beast {
|
||||
namespace nudb {
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
#ifndef BEAST_NUDB_DETAIL_GENTEX_H_INCLUDED
|
||||
#define BEAST_NUDB_DETAIL_GENTEX_H_INCLUDED
|
||||
|
||||
#include <beast/utility/noexcept.h>
|
||||
#include <condition_variable>
|
||||
#include <cstddef>
|
||||
#include <mutex>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include <beast/config/CompilerConfig.h> // for BEAST_CONSTEXPR
|
||||
#include <beast/nudb/detail/stream.h>
|
||||
#include <cstdint>
|
||||
#include <beast/cxx14/type_traits.h> // <type_traits>
|
||||
#include <type_traits>
|
||||
|
||||
namespace beast {
|
||||
namespace nudb {
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
#include <cstring>
|
||||
#include <exception>
|
||||
#include <limits>
|
||||
#include <beast/cxx14/memory.h> // <memory>
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include <array>
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
#include <beast/cxx14/type_traits.h> // <type_traits>
|
||||
#include <type_traits>
|
||||
|
||||
namespace beast {
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#ifndef BEAST_STREAMS_BASIC_SCOPED_OSTREAM_H_INCLUDED
|
||||
#define BEAST_STREAMS_BASIC_SCOPED_OSTREAM_H_INCLUDED
|
||||
|
||||
#include <beast/cxx14/memory.h> // <memory>
|
||||
#include <memory>
|
||||
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
|
||||
@@ -1,287 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
This file is part of Beast: https://github.com/vinniefalco/Beast
|
||||
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
|
||||
|
||||
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 BEAST_THREADS_SHAREDDATA_H_INCLUDED
|
||||
#define BEAST_THREADS_SHAREDDATA_H_INCLUDED
|
||||
|
||||
#include <beast/threads/RecursiveMutex.h>
|
||||
#include <beast/threads/SharedMutexAdapter.h>
|
||||
|
||||
namespace beast {
|
||||
|
||||
/** Structured, multi-threaded access to a shared state.
|
||||
|
||||
This container combines locking semantics with data access semantics to
|
||||
create an alternative to the typical synchronization method of first
|
||||
acquiring a lock and then accessing data members.
|
||||
|
||||
With this container, access to the underlying data is only possible after
|
||||
first acquiring a lock. The steps of acquiring the lock and obtaining
|
||||
a const or non-const reference to the data are combined into one
|
||||
RAII style operation.
|
||||
|
||||
There are three types of access:
|
||||
|
||||
- Access
|
||||
Provides access to the shared state via a non-const reference or pointer.
|
||||
Access acquires a unique lock on the mutex associated with the
|
||||
container.
|
||||
|
||||
- ConstAccess
|
||||
Provides access to the shared state via a const reference or pointer.
|
||||
ConstAccess acquires a shared lock on the mutex associated with the
|
||||
container.
|
||||
|
||||
- ConstUnlockedAccess
|
||||
Provides access to the shared state via a const reference or pointer.
|
||||
No locking is performed. It is the callers responsibility to ensure that
|
||||
the operation is synchronized. This can be useful for diagnostics or
|
||||
assertions, or for when it is known that no other threads can access
|
||||
the data.
|
||||
|
||||
- UnlockedAccess
|
||||
Provides access to the shared state via a reference or pointer.
|
||||
No locking is performed. It is the callers responsibility to ensure that
|
||||
the operation is synchronized. This can be useful for diagnostics or
|
||||
assertions, or for when it is known that no other threads can access
|
||||
the data.
|
||||
|
||||
Usage example:
|
||||
|
||||
@code
|
||||
|
||||
struct State
|
||||
{
|
||||
int value1;
|
||||
String value2;
|
||||
};
|
||||
|
||||
using SharedState = SharedData <State>;
|
||||
|
||||
SharedState m_state;
|
||||
|
||||
void readExample ()
|
||||
{
|
||||
SharedState::ConstAccess state (m_state);
|
||||
|
||||
print (state->value1); // read access
|
||||
print (state->value2); // read access
|
||||
|
||||
state->value1 = 42; // write disallowed: compile error
|
||||
}
|
||||
|
||||
void writeExample ()
|
||||
{
|
||||
SharedState::Access state (m_state);
|
||||
|
||||
state->value2 = "Label"; // write access, allowed
|
||||
}
|
||||
|
||||
@endcode
|
||||
|
||||
Requirements for Value:
|
||||
Constructible
|
||||
Destructible
|
||||
|
||||
Requirements for SharedMutexType:
|
||||
X is SharedMutexType, a is an instance of X:
|
||||
X a; DefaultConstructible
|
||||
X::LockGuardType Names a type that implements the LockGuard concept.
|
||||
X::SharedLockGuardType Names a type that implements the SharedLockGuard concept.
|
||||
|
||||
@tparam Value The type which the container holds.
|
||||
@tparam SharedMutexType The type of shared mutex to use.
|
||||
*/
|
||||
template <typename Value, class SharedMutexType =
|
||||
SharedMutexAdapter <RecursiveMutex> >
|
||||
class SharedData
|
||||
{
|
||||
private:
|
||||
using LockGuardType = typename SharedMutexType::LockGuardType;
|
||||
using SharedLockGuardType = typename SharedMutexType::SharedLockGuardType;
|
||||
|
||||
public:
|
||||
using ValueType = Value;
|
||||
|
||||
class Access;
|
||||
class ConstAccess;
|
||||
class UnlockedAccess;
|
||||
class ConstUnlockedAccess;
|
||||
|
||||
/** Create a shared data container.
|
||||
Up to 8 parameters can be specified in the constructor. These parameters
|
||||
are forwarded to the corresponding constructor in Data. If no
|
||||
constructor in Data matches the parameter list, a compile error is
|
||||
generated.
|
||||
*/
|
||||
/** @{ */
|
||||
SharedData () = default;
|
||||
|
||||
template <class T1>
|
||||
explicit SharedData (T1 t1)
|
||||
: m_value (t1) { }
|
||||
|
||||
template <class T1, class T2>
|
||||
SharedData (T1 t1, T2 t2)
|
||||
: m_value (t1, t2) { }
|
||||
|
||||
template <class T1, class T2, class T3>
|
||||
SharedData (T1 t1, T2 t2, T3 t3)
|
||||
: m_value (t1, t2, t3) { }
|
||||
|
||||
template <class T1, class T2, class T3, class T4>
|
||||
SharedData (T1 t1, T2 t2, T3 t3, T4 t4)
|
||||
: m_value (t1, t2, t3, t4) { }
|
||||
|
||||
template <class T1, class T2, class T3, class T4, class T5>
|
||||
SharedData (T1 t1, T2 t2, T3 t3, T4 t4, T5 t5)
|
||||
: m_value (t1, t2, t3, t4, t5) { }
|
||||
|
||||
template <class T1, class T2, class T3, class T4, class T5, class T6>
|
||||
SharedData (T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6)
|
||||
: m_value (t1, t2, t3, t4, t5, t6) { }
|
||||
|
||||
template <class T1, class T2, class T3, class T4, class T5, class T6, class T7>
|
||||
SharedData (T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7) : m_value (t1, t2, t3, t4, t5, t6, t7) { }
|
||||
|
||||
template <class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8>
|
||||
SharedData (T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8)
|
||||
: m_value (t1, t2, t3, t4, t5, t6, t7, t8) { }
|
||||
/** @} */
|
||||
|
||||
SharedData (SharedData const&) = delete;
|
||||
SharedData& operator= (SharedData const&) = delete;
|
||||
|
||||
private:
|
||||
Value m_value;
|
||||
SharedMutexType m_mutex;
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/** Provides non-const access to the contents of a SharedData.
|
||||
This acquires a unique lock on the underlying mutex.
|
||||
*/
|
||||
template <class Data, class SharedMutexType>
|
||||
class SharedData <Data, SharedMutexType>::Access
|
||||
{
|
||||
public:
|
||||
explicit Access (SharedData& state)
|
||||
: m_state (state)
|
||||
, m_lock (m_state.m_mutex)
|
||||
{ }
|
||||
|
||||
Access (Access const&) = delete;
|
||||
Access& operator= (Access const&) = delete;
|
||||
|
||||
Data const& get () const { return m_state.m_value; }
|
||||
Data const& operator* () const { return get (); }
|
||||
Data const* operator-> () const { return &get (); }
|
||||
Data& get () { return m_state.m_value; }
|
||||
Data& operator* () { return get (); }
|
||||
Data* operator-> () { return &get (); }
|
||||
|
||||
private:
|
||||
SharedData& m_state;
|
||||
typename SharedData::LockGuardType m_lock;
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/** Provides const access to the contents of a SharedData.
|
||||
This acquires a shared lock on the underlying mutex.
|
||||
*/
|
||||
template <class Data, class SharedMutexType>
|
||||
class SharedData <Data, SharedMutexType>::ConstAccess
|
||||
{
|
||||
public:
|
||||
/** Create a ConstAccess from the specified SharedData */
|
||||
explicit ConstAccess (SharedData const volatile& state)
|
||||
: m_state (const_cast <SharedData const&> (state))
|
||||
, m_lock (m_state.m_mutex)
|
||||
{ }
|
||||
|
||||
ConstAccess (ConstAccess const&) = delete;
|
||||
ConstAccess& operator= (ConstAccess const&) = delete;
|
||||
|
||||
Data const& get () const { return m_state.m_value; }
|
||||
Data const& operator* () const { return get (); }
|
||||
Data const* operator-> () const { return &get (); }
|
||||
|
||||
private:
|
||||
SharedData const& m_state;
|
||||
typename SharedData::SharedLockGuardType m_lock;
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/** Provides const access to the contents of a SharedData.
|
||||
This acquires a shared lock on the underlying mutex.
|
||||
*/
|
||||
template <class Data, class SharedMutexType>
|
||||
class SharedData <Data, SharedMutexType>::ConstUnlockedAccess
|
||||
{
|
||||
public:
|
||||
/** Create an UnlockedAccess from the specified SharedData */
|
||||
explicit ConstUnlockedAccess (SharedData const volatile& state)
|
||||
: m_state (const_cast <SharedData const&> (state))
|
||||
{ }
|
||||
|
||||
ConstUnlockedAccess (ConstUnlockedAccess const&) = delete;
|
||||
ConstUnlockedAccess& operator= (ConstUnlockedAccess const&) = delete;
|
||||
|
||||
Data const& get () const { return m_state.m_value; }
|
||||
Data const& operator* () const { return get (); }
|
||||
Data const* operator-> () const { return &get (); }
|
||||
|
||||
private:
|
||||
SharedData const& m_state;
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/** Provides access to the contents of a SharedData.
|
||||
This acquires a shared lock on the underlying mutex.
|
||||
*/
|
||||
template <class Data, class SharedMutexType>
|
||||
class SharedData <Data, SharedMutexType>::UnlockedAccess
|
||||
{
|
||||
public:
|
||||
/** Create an UnlockedAccess from the specified SharedData */
|
||||
explicit UnlockedAccess (SharedData& state)
|
||||
: m_state (state)
|
||||
{ }
|
||||
|
||||
UnlockedAccess (UnlockedAccess const&) = delete;
|
||||
UnlockedAccess& operator= (UnlockedAccess const&) = delete;
|
||||
|
||||
Data const& get () const { return m_state.m_value; }
|
||||
Data const& operator* () const { return get (); }
|
||||
Data const* operator-> () const { return &get (); }
|
||||
Data& get () { return m_state.m_value; }
|
||||
Data& operator* () { return get (); }
|
||||
Data* operator-> () { return &get (); }
|
||||
|
||||
private:
|
||||
SharedData& m_state;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -25,7 +25,6 @@
|
||||
#define BEAST_THREADS_SPINLOCK_H_INCLUDED
|
||||
|
||||
#include <beast/threads/UnlockGuard.h>
|
||||
#include <beast/utility/noexcept.h>
|
||||
#include <atomic>
|
||||
#include <cassert>
|
||||
#include <mutex>
|
||||
|
||||
@@ -22,10 +22,11 @@
|
||||
|
||||
#include <beast/intrusive/LockFreeStack.h>
|
||||
#include <beast/utility/Journal.h>
|
||||
|
||||
#include <beast/threads/WaitableEvent.h>
|
||||
|
||||
#include <atomic>
|
||||
#include <chrono>
|
||||
#include <condition_variable>
|
||||
#include <mutex>
|
||||
|
||||
namespace beast {
|
||||
|
||||
@@ -189,6 +190,15 @@ public:
|
||||
/** Returns `true` if all children have stopped. */
|
||||
bool areChildrenStopped () const;
|
||||
|
||||
/** Sleep or wake up on stop.
|
||||
|
||||
@return `true` if we are stopping
|
||||
*/
|
||||
template <class Rep, class Period>
|
||||
bool
|
||||
alertable_sleep_for(
|
||||
std::chrono::duration<Rep, Period> const& d);
|
||||
|
||||
protected:
|
||||
/** Called by derived classes to indicate that the stoppable has stopped. */
|
||||
void stopped ();
|
||||
@@ -266,8 +276,8 @@ private:
|
||||
|
||||
void prepareRecursive ();
|
||||
void startRecursive ();
|
||||
void stopAsyncRecursive ();
|
||||
void stopRecursive (Journal journal);
|
||||
void stopAsyncRecursive (Journal j);
|
||||
void stopRecursive (Journal j);
|
||||
|
||||
std::string m_name;
|
||||
RootStoppable& m_root;
|
||||
@@ -314,22 +324,55 @@ public:
|
||||
Thread safety:
|
||||
Safe to call from any thread not associated with a Stoppable.
|
||||
*/
|
||||
void stop (Journal journal = Journal());
|
||||
void stop (Journal j);
|
||||
|
||||
/** Sleep or wake up on stop.
|
||||
|
||||
@return `true` if we are stopping
|
||||
*/
|
||||
template <class Rep, class Period>
|
||||
bool
|
||||
alertable_sleep_for(
|
||||
std::chrono::duration<Rep, Period> const& d);
|
||||
|
||||
private:
|
||||
/** Notify a root stoppable and children to stop, without waiting.
|
||||
/* Notify a root stoppable and children to stop, without waiting.
|
||||
Has no effect if the stoppable was already notified.
|
||||
|
||||
Thread safety:
|
||||
Safe to call from any thread at any time.
|
||||
*/
|
||||
void stopAsync ();
|
||||
void stopAsync(Journal j);
|
||||
|
||||
std::atomic<bool> m_prepared;
|
||||
std::atomic<bool> m_calledStop;
|
||||
bool m_calledStop;
|
||||
std::atomic<bool> m_calledStopAsync;
|
||||
std::mutex m_;
|
||||
std::condition_variable c_;
|
||||
};
|
||||
/** @} */
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
template <class Rep, class Period>
|
||||
bool
|
||||
RootStoppable::alertable_sleep_for(
|
||||
std::chrono::duration<Rep, Period> const& d)
|
||||
{
|
||||
std::unique_lock<std::mutex> lock(m_);
|
||||
if (m_calledStop)
|
||||
return true;
|
||||
return c_.wait_for(lock, d, [this]{return m_calledStop;});
|
||||
}
|
||||
|
||||
template <class Rep, class Period>
|
||||
bool
|
||||
Stoppable::alertable_sleep_for(
|
||||
std::chrono::duration<Rep, Period> const& d)
|
||||
{
|
||||
return m_root.alertable_sleep_for(d);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -106,21 +106,28 @@ void Stoppable::startRecursive ()
|
||||
iter->stoppable->startRecursive ();
|
||||
}
|
||||
|
||||
void Stoppable::stopAsyncRecursive ()
|
||||
void Stoppable::stopAsyncRecursive (Journal j)
|
||||
{
|
||||
using namespace std::chrono;
|
||||
auto const start = high_resolution_clock::now();
|
||||
onStop ();
|
||||
auto const ms = duration_cast<milliseconds>(
|
||||
high_resolution_clock::now() - start).count();
|
||||
if (ms >= 10)
|
||||
j.fatal << m_name << "::onStop took " << ms << "ms";
|
||||
|
||||
for (Children::const_iterator iter (m_children.cbegin ());
|
||||
iter != m_children.cend(); ++iter)
|
||||
iter->stoppable->stopAsyncRecursive ();
|
||||
iter->stoppable->stopAsyncRecursive(j);
|
||||
}
|
||||
|
||||
void Stoppable::stopRecursive (Journal journal)
|
||||
void Stoppable::stopRecursive (Journal j)
|
||||
{
|
||||
// Block on each child from the bottom of the tree up.
|
||||
//
|
||||
for (Children::const_iterator iter (m_children.cbegin ());
|
||||
iter != m_children.cend(); ++iter)
|
||||
iter->stoppable->stopRecursive (journal);
|
||||
iter->stoppable->stopRecursive (j);
|
||||
|
||||
// if we get here then all children have stopped
|
||||
//
|
||||
@@ -132,7 +139,7 @@ void Stoppable::stopRecursive (Journal journal)
|
||||
bool const timedOut (! m_stoppedEvent.wait (1 * 1000)); // milliseconds
|
||||
if (timedOut)
|
||||
{
|
||||
journal.warning << "Waiting for '" << m_name << "' to stop";
|
||||
j.warning << "Waiting for '" << m_name << "' to stop";
|
||||
m_stoppedEvent.wait ();
|
||||
}
|
||||
|
||||
@@ -171,25 +178,29 @@ void RootStoppable::start ()
|
||||
startRecursive ();
|
||||
}
|
||||
|
||||
void RootStoppable::stop (Journal journal)
|
||||
void RootStoppable::stop (Journal j)
|
||||
{
|
||||
// Must have a prior call to start()
|
||||
bassert (m_started);
|
||||
|
||||
if (m_calledStop.exchange (true) == true)
|
||||
{
|
||||
journal.warning << "Stoppable::stop called again";
|
||||
return;
|
||||
std::lock_guard<std::mutex> lock(m_);
|
||||
if (m_calledStop)
|
||||
{
|
||||
j.warning << "Stoppable::stop called again";
|
||||
return;
|
||||
}
|
||||
m_calledStop = true;
|
||||
c_.notify_all();
|
||||
}
|
||||
|
||||
stopAsync ();
|
||||
stopRecursive (journal);
|
||||
stopAsync (j);
|
||||
stopRecursive (j);
|
||||
}
|
||||
|
||||
void RootStoppable::stopAsync ()
|
||||
void RootStoppable::stopAsync(Journal j)
|
||||
{
|
||||
if (m_calledStopAsync.exchange (true) == false)
|
||||
stopAsyncRecursive ();
|
||||
stopAsyncRecursive(j);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -403,7 +403,7 @@ class Stoppable_test
|
||||
{
|
||||
prepare();
|
||||
start();
|
||||
stop();
|
||||
stop(Journal{});
|
||||
}
|
||||
|
||||
void onPrepare() override
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
|
||||
#include <beast/unit_test/runner.h>
|
||||
|
||||
#include <beast/utility/noexcept.h>
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
#ifndef BEAST_UNIT_TEST_THREAD_H_INCLUDED
|
||||
#define BEAST_UNIT_TEST_THREAD_H_INCLUDED
|
||||
|
||||
#include <beast/utility/noexcept.h>
|
||||
#include <beast/unit_test/suite.h>
|
||||
#include <functional>
|
||||
#include <thread>
|
||||
|
||||
@@ -21,9 +21,9 @@
|
||||
#define BEAST_UTILITY_PROPERTYSTREAM_H_INCLUDED
|
||||
|
||||
#include <beast/intrusive/List.h>
|
||||
#include <beast/threads/SharedData.h>
|
||||
|
||||
#include <cstdint>
|
||||
#include <mutex>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
@@ -274,31 +274,11 @@ public:
|
||||
class PropertyStream::Source
|
||||
{
|
||||
private:
|
||||
struct State
|
||||
{
|
||||
explicit State (Source* source)
|
||||
: item (source)
|
||||
, parent (nullptr)
|
||||
{ }
|
||||
|
||||
Item item;
|
||||
Source* parent;
|
||||
List <Item> children;
|
||||
};
|
||||
|
||||
using SharedState = SharedData <State>;
|
||||
|
||||
std::string const m_name;
|
||||
SharedState m_state;
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
void remove (SharedState::Access& state,
|
||||
SharedState::Access& childState);
|
||||
|
||||
void removeAll (SharedState::Access& state);
|
||||
|
||||
void write (SharedState::Access& state, PropertyStream& stream);
|
||||
std::recursive_mutex lock_;
|
||||
Item item_;
|
||||
Source* parent_;
|
||||
List <Item> children_;
|
||||
|
||||
public:
|
||||
explicit Source (std::string const& name);
|
||||
@@ -326,7 +306,7 @@ public:
|
||||
/** Remove a child source from this Source. */
|
||||
void remove (Source& child);
|
||||
|
||||
/** Remove all child sources of this Source. */
|
||||
/** Remove all child sources from this Source. */
|
||||
void removeAll ();
|
||||
|
||||
/** Write only this Source to the stream. */
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
#include <beast/utility/tests/bassert.test.cpp>
|
||||
#include <beast/utility/tests/empty_base_optimization.test.cpp>
|
||||
#include <beast/utility/tests/Journal.test.cpp>
|
||||
#include <beast/utility/tests/static_initializer.test.cpp>
|
||||
#include <beast/utility/tests/tagged_integer.test.cpp>
|
||||
#include <beast/utility/tests/weak_fn.test.cpp>
|
||||
#include <beast/utility/tests/Zero.test.cpp>
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
#ifndef BEAST_UTILITY_CI_CHAR_TRAITS_H_INCLUDED
|
||||
#define BEAST_UTILITY_CI_CHAR_TRAITS_H_INCLUDED
|
||||
|
||||
#include <beast/cxx14/algorithm.h> // <algorithm>
|
||||
#include <beast/cxx14/type_traits.h> // <type_traits>
|
||||
#include <algorithm>
|
||||
#include <type_traits>
|
||||
#include <cctype>
|
||||
#include <iterator>
|
||||
#include <string>
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
#ifndef BEAST_UTILITY_EMPTY_BASE_OPTIMIZATION_H_INCLUDED
|
||||
#define BEAST_UTILITY_EMPTY_BASE_OPTIMIZATION_H_INCLUDED
|
||||
|
||||
#include <beast/utility/noexcept.h>
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
//==============================================================================
|
||||
|
||||
#include <beast/utility/Journal.h>
|
||||
#include <beast/utility/static_initializer.h>
|
||||
|
||||
namespace beast {
|
||||
|
||||
@@ -60,8 +59,8 @@ public:
|
||||
|
||||
Journal::Sink& Journal::getNullSink ()
|
||||
{
|
||||
static beast::static_initializer<NullJournalSink> sink;
|
||||
return *sink;
|
||||
static NullJournalSink sink;
|
||||
return sink;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@@ -173,16 +173,17 @@ PropertyStream const& PropertyStream::Set::stream() const
|
||||
|
||||
PropertyStream::Source::Source (std::string const& name)
|
||||
: m_name (name)
|
||||
, m_state (this)
|
||||
, item_ (this)
|
||||
, parent_ (nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
PropertyStream::Source::~Source ()
|
||||
{
|
||||
SharedState::Access state (m_state);
|
||||
if (state->parent != nullptr)
|
||||
state->parent->remove (*this);
|
||||
removeAll (state);
|
||||
std::lock_guard<std::recursive_mutex> _(lock_);
|
||||
if (parent_ != nullptr)
|
||||
parent_->remove (*this);
|
||||
removeAll ();
|
||||
}
|
||||
|
||||
std::string const& PropertyStream::Source::name () const
|
||||
@@ -192,37 +193,35 @@ std::string const& PropertyStream::Source::name () const
|
||||
|
||||
void PropertyStream::Source::add (Source& source)
|
||||
{
|
||||
SharedState::Access state (m_state);
|
||||
SharedState::Access childState (source.m_state);
|
||||
bassert (childState->parent == nullptr);
|
||||
state->children.push_back (childState->item);
|
||||
childState->parent = this;
|
||||
std::lock(lock_, source.lock_);
|
||||
std::lock_guard<std::recursive_mutex> lk1(lock_, std::adopt_lock);
|
||||
std::lock_guard<std::recursive_mutex> lk2(source.lock_, std::adopt_lock);
|
||||
|
||||
bassert (source.parent_ == nullptr);
|
||||
children_.push_back (source.item_);
|
||||
source.parent_ = this;
|
||||
}
|
||||
|
||||
void PropertyStream::Source::remove (Source& child)
|
||||
{
|
||||
SharedState::Access state (m_state);
|
||||
SharedState::Access childState (child.m_state);
|
||||
remove (state, childState);
|
||||
std::lock(lock_, child.lock_);
|
||||
std::lock_guard<std::recursive_mutex> lk1(lock_, std::adopt_lock);
|
||||
std::lock_guard<std::recursive_mutex> lk2(child.lock_, std::adopt_lock);
|
||||
|
||||
bassert (child.parent_ == this);
|
||||
children_.erase (
|
||||
children_.iterator_to (
|
||||
child.item_));
|
||||
child.parent_ = nullptr;
|
||||
}
|
||||
|
||||
void PropertyStream::Source::removeAll ()
|
||||
{
|
||||
SharedState::Access state (m_state);
|
||||
removeAll (state);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
void PropertyStream::Source::write (
|
||||
SharedState::Access& state, PropertyStream &stream)
|
||||
{
|
||||
for (List <Item>::iterator iter (state->children.begin());
|
||||
iter != state->children.end(); ++iter)
|
||||
std::lock_guard<std::recursive_mutex> _(lock_);
|
||||
for (auto iter = children_.begin(); iter != children_.end(); )
|
||||
{
|
||||
Source& source (iter->source());
|
||||
Map map (source.name(), stream);
|
||||
source.write (stream);
|
||||
std::lock_guard<std::recursive_mutex> _cl((*iter)->lock_);
|
||||
remove (*(*iter));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -239,14 +238,10 @@ void PropertyStream::Source::write (PropertyStream& stream)
|
||||
Map map (m_name, stream);
|
||||
onWrite (map);
|
||||
|
||||
SharedState::Access state (m_state);
|
||||
std::lock_guard<std::recursive_mutex> _(lock_);
|
||||
|
||||
for (List <Item>::iterator iter (state->children.begin());
|
||||
iter != state->children.end(); ++iter)
|
||||
{
|
||||
Source& source (iter->source());
|
||||
source.write (stream);
|
||||
}
|
||||
for (auto& child : children_)
|
||||
child.source().write (stream);
|
||||
}
|
||||
|
||||
void PropertyStream::Source::write (PropertyStream& stream, std::string const& path)
|
||||
@@ -330,8 +325,9 @@ PropertyStream::Source* PropertyStream::Source::find_one_deep (std::string const
|
||||
Source* found = find_one (name);
|
||||
if (found != nullptr)
|
||||
return found;
|
||||
SharedState::Access state (this->m_state);
|
||||
for (auto& s : state->children)
|
||||
|
||||
std::lock_guard<std::recursive_mutex> _(lock_);
|
||||
for (auto& s : children_)
|
||||
{
|
||||
found = s.source().find_one_deep (name);
|
||||
if (found != nullptr)
|
||||
@@ -360,8 +356,8 @@ PropertyStream::Source* PropertyStream::Source::find_path (std::string path)
|
||||
// If no immediate children match, then return nullptr
|
||||
PropertyStream::Source* PropertyStream::Source::find_one (std::string const& name)
|
||||
{
|
||||
SharedState::Access state (this->m_state);
|
||||
for (auto& s : state->children)
|
||||
std::lock_guard<std::recursive_mutex> _(lock_);
|
||||
for (auto& s : children_)
|
||||
{
|
||||
if (s.source().m_name == name)
|
||||
return &s.source();
|
||||
@@ -373,28 +369,6 @@ void PropertyStream::Source::onWrite (Map&)
|
||||
{
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
void PropertyStream::Source::remove (
|
||||
SharedState::Access& state, SharedState::Access& childState)
|
||||
{
|
||||
bassert (childState->parent == this);
|
||||
state->children.erase (
|
||||
state->children.iterator_to (
|
||||
childState->item));
|
||||
childState->parent = nullptr;
|
||||
}
|
||||
|
||||
void PropertyStream::Source::removeAll (SharedState::Access& state)
|
||||
{
|
||||
for (List <Item>::iterator iter (state->children.begin());
|
||||
iter != state->children.end();)
|
||||
{
|
||||
SharedState::Access childState ((*iter)->m_state);
|
||||
remove (state, childState);
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
//
|
||||
// PropertyStream
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#ifndef BEAST_UTILITY_META_H_INCLUDED
|
||||
#define BEAST_UTILITY_META_H_INCLUDED
|
||||
|
||||
#include <beast/cxx14/type_traits.h> // <type_traits>
|
||||
#include <type_traits>
|
||||
|
||||
namespace beast {
|
||||
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
This file is part of Beast: https://github.com/vinniefalco/Beast
|
||||
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
|
||||
|
||||
Portions of this file are from JUCE.
|
||||
Copyright (c) 2013 - Raw Material Software Ltd.
|
||||
Please visit http://www.juce.com
|
||||
|
||||
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 BEAST_UTILITY_NOEXCEPT_H_INCLUDED
|
||||
#define BEAST_UTILITY_NOEXCEPT_H_INCLUDED
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# if _MSC_VER < 1900
|
||||
# ifdef noexcept
|
||||
# undef noexcept
|
||||
# endif
|
||||
# define noexcept throw()
|
||||
# endif
|
||||
# if _MSC_VER > 1600 && ! _ALLOW_KEYWORD_MACROS
|
||||
# define _ALLOW_KEYWORD_MACROS 1 // (to stop VC2012 complaining)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,258 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
This file is part of Beast: https://github.com/vinniefalco/Beast
|
||||
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
|
||||
|
||||
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 BEAST_UTILITY_STATIC_INITIALIZER_H_INCLUDED
|
||||
#define BEAST_UTILITY_STATIC_INITIALIZER_H_INCLUDED
|
||||
|
||||
#include <beast/utility/noexcept.h>
|
||||
#include <utility>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include <cassert>
|
||||
#include <new>
|
||||
#include <thread>
|
||||
#include <type_traits>
|
||||
#include <intrin.h>
|
||||
#endif
|
||||
|
||||
namespace beast {
|
||||
|
||||
/** Returns an object with static storage duration.
|
||||
This is a workaround for Visual Studio 2013 and earlier non-thread
|
||||
safe initialization of function local objects with static storage duration.
|
||||
|
||||
Usage:
|
||||
@code
|
||||
my_class& foo()
|
||||
{
|
||||
static static_initializer <my_class> instance;
|
||||
return *instance;
|
||||
}
|
||||
@endcode
|
||||
*/
|
||||
#ifdef _MSC_VER
|
||||
template <
|
||||
class T,
|
||||
class Tag = void
|
||||
>
|
||||
class static_initializer
|
||||
{
|
||||
private:
|
||||
struct data_t
|
||||
{
|
||||
// 0 = unconstructed
|
||||
// 1 = constructing
|
||||
// 2 = constructed
|
||||
long volatile state;
|
||||
|
||||
typename std::aligned_storage <sizeof(T),
|
||||
std::alignment_of <T>::value>::type storage;
|
||||
};
|
||||
|
||||
struct destroyer
|
||||
{
|
||||
T* t_;
|
||||
explicit destroyer (T* t) : t_(t) { }
|
||||
~destroyer() { t_->~T(); }
|
||||
};
|
||||
|
||||
static
|
||||
data_t&
|
||||
data() noexcept;
|
||||
|
||||
public:
|
||||
template <class... Args>
|
||||
explicit static_initializer (Args&&... args);
|
||||
|
||||
T&
|
||||
get() noexcept;
|
||||
|
||||
T const&
|
||||
get() const noexcept
|
||||
{
|
||||
return const_cast<static_initializer&>(*this).get();
|
||||
}
|
||||
|
||||
T&
|
||||
operator*() noexcept
|
||||
{
|
||||
return get();
|
||||
}
|
||||
|
||||
T const&
|
||||
operator*() const noexcept
|
||||
{
|
||||
return get();
|
||||
}
|
||||
|
||||
T*
|
||||
operator->() noexcept
|
||||
{
|
||||
return &get();
|
||||
}
|
||||
|
||||
T const*
|
||||
operator->() const noexcept
|
||||
{
|
||||
return &get();
|
||||
}
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
template <class T, class Tag>
|
||||
auto
|
||||
static_initializer <T, Tag>::data() noexcept ->
|
||||
data_t&
|
||||
{
|
||||
static data_t _; // zero-initialized
|
||||
return _;
|
||||
}
|
||||
|
||||
template <class T, class Tag>
|
||||
template <class... Args>
|
||||
static_initializer <T, Tag>::static_initializer (Args&&... args)
|
||||
{
|
||||
data_t& _(data());
|
||||
|
||||
// Double Checked Locking Pattern
|
||||
|
||||
if (_.state != 2)
|
||||
{
|
||||
T* const t (reinterpret_cast<T*>(&_.storage));
|
||||
|
||||
for(;;)
|
||||
{
|
||||
long prev;
|
||||
prev = _InterlockedCompareExchange(&_.state, 1, 0);
|
||||
if (prev == 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
::new(t) T (std::forward<Args>(args)...);
|
||||
static destroyer on_exit (t);
|
||||
_InterlockedIncrement(&_.state);
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
// Constructors that throw exceptions are unsupported
|
||||
std::terminate();
|
||||
}
|
||||
}
|
||||
else if (prev == 1)
|
||||
{
|
||||
std::this_thread::yield();
|
||||
}
|
||||
else
|
||||
{
|
||||
assert(prev == 2);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
template <class T, class Tag>
|
||||
T&
|
||||
static_initializer <T, Tag>::get() noexcept
|
||||
{
|
||||
data_t& _(data());
|
||||
for(;;)
|
||||
{
|
||||
if (_.state == 2)
|
||||
break;
|
||||
std::this_thread::yield();
|
||||
}
|
||||
return *reinterpret_cast<T*>(&_.storage);
|
||||
}
|
||||
|
||||
#else
|
||||
template <
|
||||
class T,
|
||||
class Tag = void
|
||||
>
|
||||
class static_initializer
|
||||
{
|
||||
private:
|
||||
T* instance_;
|
||||
|
||||
public:
|
||||
template <class... Args>
|
||||
explicit
|
||||
static_initializer (Args&&... args);
|
||||
|
||||
static_initializer ();
|
||||
|
||||
T&
|
||||
get() noexcept
|
||||
{
|
||||
return *instance_;
|
||||
}
|
||||
|
||||
T const&
|
||||
get() const noexcept
|
||||
{
|
||||
return const_cast<static_initializer&>(*this).get();
|
||||
}
|
||||
|
||||
T&
|
||||
operator*() noexcept
|
||||
{
|
||||
return get();
|
||||
}
|
||||
|
||||
T const&
|
||||
operator*() const noexcept
|
||||
{
|
||||
return get();
|
||||
}
|
||||
|
||||
T*
|
||||
operator->() noexcept
|
||||
{
|
||||
return &get();
|
||||
}
|
||||
|
||||
T const*
|
||||
operator->() const noexcept
|
||||
{
|
||||
return &get();
|
||||
}
|
||||
};
|
||||
|
||||
template <class T, class Tag>
|
||||
static_initializer <T, Tag>::static_initializer ()
|
||||
{
|
||||
static T t;
|
||||
instance_ = &t;
|
||||
}
|
||||
|
||||
template <class T, class Tag>
|
||||
template <class... Args>
|
||||
static_initializer <T, Tag>::static_initializer (Args&&... args)
|
||||
{
|
||||
static T t (std::forward<Args>(args)...);
|
||||
instance_ = &t;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -22,8 +22,6 @@
|
||||
|
||||
#include <beast/hash/hash_append.h>
|
||||
|
||||
#include <beast/utility/noexcept.h>
|
||||
|
||||
#include <functional>
|
||||
#include <iostream>
|
||||
#include <type_traits>
|
||||
|
||||
@@ -1,209 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
This file is part of Beast: https://github.com/vinniefalco/Beast
|
||||
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
|
||||
|
||||
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 <beast/utility/static_initializer.h>
|
||||
#include <beast/unit_test/suite.h>
|
||||
#include <atomic>
|
||||
#include <sstream>
|
||||
#include <thread>
|
||||
#include <utility>
|
||||
|
||||
namespace beast {
|
||||
|
||||
static_assert(__alignof(long) >= 4, "");
|
||||
|
||||
class static_initializer_test : public unit_test::suite
|
||||
{
|
||||
public:
|
||||
// Used to create separate instances for each test
|
||||
struct cxx11_tag { };
|
||||
struct beast_tag { };
|
||||
template <std::size_t N, class Tag>
|
||||
struct Case
|
||||
{
|
||||
enum { count = N };
|
||||
using type = Tag;
|
||||
};
|
||||
|
||||
struct Counts
|
||||
{
|
||||
Counts()
|
||||
: calls (0)
|
||||
, constructed (0)
|
||||
, access (0)
|
||||
{
|
||||
}
|
||||
|
||||
// number of calls to the constructor
|
||||
std::atomic <long> calls;
|
||||
|
||||
// incremented after construction completes
|
||||
std::atomic <long> constructed;
|
||||
|
||||
// increment when class is accessed before construction
|
||||
std::atomic <long> access;
|
||||
};
|
||||
|
||||
/* This testing singleton detects two conditions:
|
||||
1. Being accessed before getting fully constructed
|
||||
2. Getting constructed twice
|
||||
*/
|
||||
template <class Tag>
|
||||
class Test;
|
||||
|
||||
template <class Function>
|
||||
static
|
||||
void
|
||||
run_many (std::size_t n, Function f);
|
||||
|
||||
template <class Tag>
|
||||
void
|
||||
test (cxx11_tag);
|
||||
|
||||
template <class Tag>
|
||||
void
|
||||
test (beast_tag);
|
||||
|
||||
template <class Tag>
|
||||
void
|
||||
test();
|
||||
|
||||
void
|
||||
run ();
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
template <class Tag>
|
||||
class static_initializer_test::Test
|
||||
{
|
||||
public:
|
||||
explicit
|
||||
Test (Counts& counts);
|
||||
|
||||
void
|
||||
operator() (Counts& counts);
|
||||
};
|
||||
|
||||
template <class Tag>
|
||||
static_initializer_test::Test<Tag>::Test (Counts& counts)
|
||||
{
|
||||
++counts.calls;
|
||||
std::this_thread::sleep_for (std::chrono::milliseconds (10));
|
||||
++counts.constructed;
|
||||
}
|
||||
|
||||
template <class Tag>
|
||||
void
|
||||
static_initializer_test::Test<Tag>::operator() (Counts& counts)
|
||||
{
|
||||
if (! counts.constructed)
|
||||
++counts.access;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
template <class Function>
|
||||
void
|
||||
static_initializer_test::run_many (std::size_t n, Function f)
|
||||
{
|
||||
std::atomic <bool> start (false);
|
||||
std::vector <std::thread> threads;
|
||||
|
||||
threads.reserve (n);
|
||||
|
||||
for (auto i (n); i-- ;)
|
||||
{
|
||||
threads.emplace_back([&]()
|
||||
{
|
||||
while (! start.load())
|
||||
std::this_thread::yield();
|
||||
f();
|
||||
});
|
||||
}
|
||||
std::this_thread::sleep_for (std::chrono::milliseconds (10));
|
||||
std::this_thread::yield();
|
||||
start.store (true);
|
||||
for (auto& thread : threads)
|
||||
thread.join();
|
||||
}
|
||||
|
||||
template <class Tag>
|
||||
void
|
||||
static_initializer_test::test (cxx11_tag)
|
||||
{
|
||||
testcase << "cxx11 " << Tag::count << " threads";
|
||||
|
||||
Counts counts;
|
||||
|
||||
run_many (Tag::count, [&]()
|
||||
{
|
||||
static Test <Tag> t (counts);
|
||||
t(counts);
|
||||
});
|
||||
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1900
|
||||
// Visual Studio 2013 and earlier can exhibit both double
|
||||
// construction, and access before construction when function
|
||||
// local statics are initialized concurrently.
|
||||
//
|
||||
expect (counts.constructed > 1 || counts.access > 0);
|
||||
|
||||
#else
|
||||
expect (counts.constructed == 1 && counts.access == 0);
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class Tag>
|
||||
void
|
||||
static_initializer_test::test (beast_tag)
|
||||
{
|
||||
testcase << "beast " << Tag::count << " threads";
|
||||
|
||||
Counts counts;
|
||||
|
||||
run_many (Tag::count, [&counts]()
|
||||
{
|
||||
static static_initializer <Test <Tag>> t (counts);
|
||||
(*t)(counts);
|
||||
});
|
||||
|
||||
expect (counts.constructed == 1 && counts.access == 0);
|
||||
}
|
||||
|
||||
template <class Tag>
|
||||
void
|
||||
static_initializer_test::test()
|
||||
{
|
||||
test <Tag> (typename Tag::type {});
|
||||
}
|
||||
|
||||
void
|
||||
static_initializer_test::run ()
|
||||
{
|
||||
test <Case< 4, cxx11_tag>> ();
|
||||
test <Case< 4, beast_tag>> ();
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
BEAST_DEFINE_TESTSUITE(static_initializer,utility,beast);
|
||||
|
||||
}
|
||||
@@ -54,7 +54,7 @@ AcceptedLedgerTx::AcceptedLedgerTx (
|
||||
|
||||
AcceptedLedgerTx::AcceptedLedgerTx (
|
||||
std::shared_ptr<ReadView const> const& ledger,
|
||||
STTx::ref txn,
|
||||
std::shared_ptr<STTx const> const& txn,
|
||||
TER result,
|
||||
AccountIDCache const& accountCache,
|
||||
Logs& logs)
|
||||
|
||||
@@ -62,7 +62,7 @@ public:
|
||||
Logs&);
|
||||
AcceptedLedgerTx (
|
||||
std::shared_ptr<ReadView const> const&,
|
||||
STTx::ref,
|
||||
std::shared_ptr<STTx const> const&,
|
||||
TER,
|
||||
AccountIDCache const&,
|
||||
Logs&);
|
||||
|
||||
@@ -20,9 +20,9 @@
|
||||
#include <BeastConfig.h>
|
||||
#include <ripple/app/ledger/AccountStateSF.h>
|
||||
#include <ripple/app/ledger/LedgerMaster.h>
|
||||
#include <ripple/app/ledger/TransactionMaster.h>
|
||||
#include <ripple/app/main/Application.h>
|
||||
#include <ripple/app/misc/NetworkOPs.h>
|
||||
#include <ripple/app/tx/TransactionMaster.h>
|
||||
#include <ripple/nodestore/Database.h>
|
||||
#include <ripple/protocol/HashPrefix.h>
|
||||
|
||||
@@ -35,22 +35,22 @@ AccountStateSF::AccountStateSF(Application& app)
|
||||
|
||||
void AccountStateSF::gotNode (bool fromFilter,
|
||||
SHAMapNodeID const& id,
|
||||
uint256 const& nodeHash,
|
||||
SHAMapHash const& nodeHash,
|
||||
Blob& nodeData,
|
||||
SHAMapTreeNode::TNType)
|
||||
SHAMapTreeNode::TNType) const
|
||||
{
|
||||
// VFALCO SHAMapSync filters should be passed the SHAMap, the
|
||||
// SHAMap should provide an accessor to get the injected Database,
|
||||
// and this should use that Database instad of getNodeStore
|
||||
app_.getNodeStore ().store (
|
||||
hotACCOUNT_NODE, std::move (nodeData), nodeHash);
|
||||
hotACCOUNT_NODE, std::move (nodeData), nodeHash.as_uint256());
|
||||
}
|
||||
|
||||
bool AccountStateSF::haveNode (SHAMapNodeID const& id,
|
||||
uint256 const& nodeHash,
|
||||
Blob& nodeData)
|
||||
SHAMapHash const& nodeHash,
|
||||
Blob& nodeData) const
|
||||
{
|
||||
return app_.getLedgerMaster ().getFetchPack (nodeHash, nodeData);
|
||||
return app_.getLedgerMaster ().getFetchPack (nodeHash.as_uint256(), nodeData);
|
||||
}
|
||||
|
||||
} // ripple
|
||||
|
||||
@@ -40,13 +40,13 @@ public:
|
||||
// Note that the nodeData is overwritten by this call
|
||||
void gotNode (bool fromFilter,
|
||||
SHAMapNodeID const& id,
|
||||
uint256 const& nodeHash,
|
||||
SHAMapHash const& nodeHash,
|
||||
Blob& nodeData,
|
||||
SHAMapTreeNode::TNType) override;
|
||||
SHAMapTreeNode::TNType) const override;
|
||||
|
||||
bool haveNode (SHAMapNodeID const& id,
|
||||
uint256 const& nodeHash,
|
||||
Blob& nodeData) override;
|
||||
SHAMapHash const& nodeHash,
|
||||
Blob& nodeData) const override;
|
||||
};
|
||||
|
||||
} // ripple
|
||||
|
||||
@@ -26,13 +26,13 @@ namespace ripple {
|
||||
|
||||
void BookListeners::addSubscriber (InfoSub::ref sub)
|
||||
{
|
||||
ScopedLockType sl (mLock);
|
||||
std::lock_guard <std::recursive_mutex> sl (mLock);
|
||||
mListeners[sub->getSeq ()] = sub;
|
||||
}
|
||||
|
||||
void BookListeners::removeSubscriber (std::uint64_t seq)
|
||||
{
|
||||
ScopedLockType sl (mLock);
|
||||
std::lock_guard <std::recursive_mutex> sl (mLock);
|
||||
mListeners.erase (seq);
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ void BookListeners::publish (Json::Value const& jvObj)
|
||||
{
|
||||
std::string sObj = to_string (jvObj);
|
||||
|
||||
ScopedLockType sl (mLock);
|
||||
std::lock_guard <std::recursive_mutex> sl (mLock);
|
||||
auto it = mListeners.cbegin ();
|
||||
|
||||
while (it != mListeners.cend ())
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
#include <ripple/net/InfoSub.h>
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
|
||||
namespace ripple {
|
||||
|
||||
@@ -38,9 +39,7 @@ public:
|
||||
void publish (Json::Value const& jvObj);
|
||||
|
||||
private:
|
||||
using LockType = RippleRecursiveMutex;
|
||||
using ScopedLockType = std::lock_guard <LockType>;
|
||||
LockType mLock;
|
||||
std::recursive_mutex mLock;
|
||||
|
||||
hash_map<std::uint64_t, InfoSub::wptr> mListeners;
|
||||
};
|
||||
|
||||
@@ -22,16 +22,17 @@
|
||||
|
||||
#include <ripple/app/ledger/LedgerConsensus.h>
|
||||
#include <ripple/app/ledger/LedgerMaster.h>
|
||||
#include <ripple/app/ledger/InboundTransactions.h>
|
||||
#include <ripple/app/main/Application.h>
|
||||
#include <ripple/app/tx/InboundTransactions.h>
|
||||
#include <ripple/app/tx/LocalTxs.h>
|
||||
#include <ripple/basics/Log.h>
|
||||
#include <ripple/core/Config.h>
|
||||
|
||||
#include <beast/cxx14/memory.h> // <memory>
|
||||
#include <memory>
|
||||
|
||||
namespace ripple {
|
||||
|
||||
class LocalTxs;
|
||||
|
||||
/** Implements the consensus process and provides inter-round state. */
|
||||
class Consensus
|
||||
{
|
||||
@@ -58,25 +59,31 @@ public:
|
||||
|
||||
/** Returns the time (in milliseconds) that the last close took. */
|
||||
virtual
|
||||
int
|
||||
std::chrono::milliseconds
|
||||
getLastCloseDuration () const = 0;
|
||||
|
||||
/** Called to create a LedgerConsensus instance */
|
||||
virtual
|
||||
std::shared_ptr<LedgerConsensus>
|
||||
makeLedgerConsensus (
|
||||
Application& app,
|
||||
InboundTransactions& inboundTransactions,
|
||||
LedgerMaster& ledgerMaster,
|
||||
LocalTxs& localTxs) = 0;
|
||||
|
||||
/** Called when a new round of consensus is about to begin */
|
||||
virtual
|
||||
std::shared_ptr<LedgerConsensus>
|
||||
void
|
||||
startRound (
|
||||
Application& app,
|
||||
InboundTransactions& inboundTransactions,
|
||||
LocalTxs& localtx,
|
||||
LedgerMaster& ledgerMaster,
|
||||
LedgerConsensus& consensus,
|
||||
LedgerHash const &prevLCLHash,
|
||||
Ledger::ref previousLedger,
|
||||
std::uint32_t closeTime) = 0;
|
||||
NetClock::time_point closeTime) = 0;
|
||||
|
||||
/** Specified the network time when the last ledger closed */
|
||||
virtual
|
||||
void
|
||||
setLastCloseTime (std::uint32_t t) = 0;
|
||||
setLastCloseTime (NetClock::time_point t) = 0;
|
||||
|
||||
virtual
|
||||
void
|
||||
|
||||
@@ -19,9 +19,10 @@
|
||||
|
||||
#include <BeastConfig.h>
|
||||
#include <ripple/app/ledger/ConsensusTransSetSF.h>
|
||||
#include <ripple/app/ledger/TransactionMaster.h>
|
||||
#include <ripple/app/main/Application.h>
|
||||
#include <ripple/app/misc/NetworkOPs.h>
|
||||
#include <ripple/app/tx/TransactionMaster.h>
|
||||
#include <ripple/app/misc/Transaction.h>
|
||||
#include <ripple/basics/Log.h>
|
||||
#include <ripple/protocol/digest.h>
|
||||
#include <ripple/core/JobQueue.h>
|
||||
@@ -38,8 +39,8 @@ ConsensusTransSetSF::ConsensusTransSetSF (Application& app, NodeCache& nodeCache
|
||||
}
|
||||
|
||||
void ConsensusTransSetSF::gotNode (
|
||||
bool fromFilter, const SHAMapNodeID& id, uint256 const& nodeHash,
|
||||
Blob& nodeData, SHAMapTreeNode::TNType type)
|
||||
bool fromFilter, const SHAMapNodeID& id, SHAMapHash const& nodeHash,
|
||||
Blob& nodeData, SHAMapTreeNode::TNType type) const
|
||||
{
|
||||
if (fromFilter)
|
||||
return;
|
||||
@@ -57,8 +58,8 @@ void ConsensusTransSetSF::gotNode (
|
||||
// skip prefix
|
||||
Serializer s (nodeData.data() + 4, nodeData.size() - 4);
|
||||
SerialIter sit (s.slice());
|
||||
STTx::pointer stx = std::make_shared<STTx> (std::ref (sit));
|
||||
assert (stx->getTransactionID () == nodeHash);
|
||||
auto stx = std::make_shared<STTx const> (std::ref (sit));
|
||||
assert (stx->getTransactionID () == nodeHash.as_uint256());
|
||||
auto const pap = &app_;
|
||||
app_.getJobQueue ().addJob (
|
||||
jtTRANSACTION, "TXS->TXN",
|
||||
@@ -66,7 +67,7 @@ void ConsensusTransSetSF::gotNode (
|
||||
pap->getOPs().submitTransaction(stx);
|
||||
});
|
||||
}
|
||||
catch (...)
|
||||
catch (std::exception const&)
|
||||
{
|
||||
JLOG (j_.warning)
|
||||
<< "Fetched invalid transaction in proposed set";
|
||||
@@ -75,12 +76,12 @@ void ConsensusTransSetSF::gotNode (
|
||||
}
|
||||
|
||||
bool ConsensusTransSetSF::haveNode (
|
||||
const SHAMapNodeID& id, uint256 const& nodeHash, Blob& nodeData)
|
||||
const SHAMapNodeID& id, SHAMapHash const& nodeHash, Blob& nodeData) const
|
||||
{
|
||||
if (m_nodeCache.retrieve (nodeHash, nodeData))
|
||||
return true;
|
||||
|
||||
auto txn = app_.getMasterTransaction().fetch(nodeHash, false);
|
||||
auto txn = app_.getMasterTransaction().fetch(nodeHash.as_uint256(), false);
|
||||
|
||||
if (txn)
|
||||
{
|
||||
@@ -90,7 +91,7 @@ bool ConsensusTransSetSF::haveNode (
|
||||
Serializer s;
|
||||
s.add32 (HashPrefix::transactionID);
|
||||
txn->getSTransaction ()->add (s);
|
||||
assert(sha512Half(s.slice()) == nodeHash);
|
||||
assert(sha512Half(s.slice()) == nodeHash.as_uint256());
|
||||
nodeData = s.peekData ();
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -34,20 +34,20 @@ namespace ripple {
|
||||
class ConsensusTransSetSF : public SHAMapSyncFilter
|
||||
{
|
||||
public:
|
||||
using NodeCache = TaggedCache <uint256, Blob>;
|
||||
using NodeCache = TaggedCache <SHAMapHash, Blob>;
|
||||
|
||||
ConsensusTransSetSF (Application& app, NodeCache& nodeCache);
|
||||
|
||||
// Note that the nodeData is overwritten by this call
|
||||
void gotNode (bool fromFilter,
|
||||
SHAMapNodeID const& id,
|
||||
uint256 const& nodeHash,
|
||||
SHAMapHash const& nodeHash,
|
||||
Blob& nodeData,
|
||||
SHAMapTreeNode::TNType) override;
|
||||
SHAMapTreeNode::TNType) const override;
|
||||
|
||||
bool haveNode (SHAMapNodeID const& id,
|
||||
uint256 const& nodeHash,
|
||||
Blob& nodeData) override;
|
||||
SHAMapHash const& nodeHash,
|
||||
Blob& nodeData) const override;
|
||||
|
||||
private:
|
||||
Application& app_;
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include <ripple/app/ledger/Ledger.h>
|
||||
#include <ripple/overlay/PeerSet.h>
|
||||
#include <ripple/basics/CountedObject.h>
|
||||
#include <mutex>
|
||||
#include <set>
|
||||
|
||||
namespace ripple {
|
||||
@@ -92,7 +93,9 @@ public:
|
||||
// VFALCO TODO Make this the Listener / Observer pattern
|
||||
bool addOnComplete (std::function<void (InboundLedger::pointer)>);
|
||||
|
||||
void trigger (Peer::ptr const&);
|
||||
enum class TriggerReason { trAdded, trReply, trTimeout };
|
||||
void trigger (Peer::ptr const&, TriggerReason);
|
||||
|
||||
bool tryLocal ();
|
||||
void addPeers ();
|
||||
bool checkLocal ();
|
||||
@@ -108,7 +111,7 @@ public:
|
||||
// VFALCO TODO Replace uint256 with something semanticallyh meaningful
|
||||
void filterNodes (
|
||||
std::vector<SHAMapNodeID>& nodeIDs, std::vector<uint256>& nodeHashes,
|
||||
int max, bool aggressive);
|
||||
TriggerReason reason);
|
||||
|
||||
/** Return a Json::objectValue. */
|
||||
Json::Value getJson (int);
|
||||
@@ -124,7 +127,7 @@ private:
|
||||
// For historical nodes, do not trigger too soon
|
||||
// since a fetch pack is probably coming
|
||||
if (mReason != fcHISTORY)
|
||||
trigger (peer);
|
||||
trigger (peer, TriggerReason::trAdded);
|
||||
}
|
||||
|
||||
std::weak_ptr <PeerSet> pmDowncast ();
|
||||
@@ -159,8 +162,10 @@ private:
|
||||
|
||||
std::set <uint256> mRecentNodes;
|
||||
|
||||
SHAMapAddNode mStats;
|
||||
|
||||
// Data we have received from peers
|
||||
PeerSet::LockType mReceivedDataLock;
|
||||
std::recursive_mutex mReceivedDataLock;
|
||||
std::vector <PeerDataPairType> mReceivedData;
|
||||
bool mReceiveDispatched;
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include <ripple/app/ledger/InboundLedger.h>
|
||||
#include <ripple/protocol/RippleLedgerHash.h>
|
||||
#include <beast/threads/Stoppable.h>
|
||||
#include <beast/cxx14/memory.h> // <memory>
|
||||
#include <memory>
|
||||
|
||||
namespace ripple {
|
||||
|
||||
@@ -49,7 +49,6 @@ public:
|
||||
|
||||
virtual void dropLedger (LedgerHash const& ledgerHash) = 0;
|
||||
|
||||
// VFALCO TODO Why is hash passed by value?
|
||||
// VFALCO TODO Remove the dependency on the Peer object.
|
||||
//
|
||||
virtual bool gotLedgerData (LedgerHash const& ledgerHash,
|
||||
|
||||
@@ -17,17 +17,19 @@
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#ifndef RIPPLE_INBOUNDTRANSACTIONS_H
|
||||
#define RIPPLE_INBOUNDTRANSACTIONS_H
|
||||
#ifndef RIPPLE_APP_LEDGER_INBOUNDTRANSACTIONS_H_INCLUDED
|
||||
#define RIPPLE_APP_LEDGER_INBOUNDTRANSACTIONS_H_INCLUDED
|
||||
|
||||
#include <ripple/overlay/Peer.h>
|
||||
#include <ripple/shamap/SHAMap.h>
|
||||
#include <beast/chrono/abstract_clock.h>
|
||||
#include <beast/cxx14/memory.h> // <memory>
|
||||
#include <beast/threads/Stoppable.h>
|
||||
#include <memory>
|
||||
|
||||
namespace ripple {
|
||||
|
||||
class Application;
|
||||
|
||||
/** Manages the acquisition and lifetime of transaction sets.
|
||||
*/
|
||||
|
||||
@@ -26,10 +26,10 @@
|
||||
#include <ripple/app/ledger/LedgerToJson.h>
|
||||
#include <ripple/app/ledger/OrderBookDB.h>
|
||||
#include <ripple/app/ledger/PendingSaves.h>
|
||||
#include <ripple/app/ledger/TransactionMaster.h>
|
||||
#include <ripple/app/main/Application.h>
|
||||
#include <ripple/app/misc/HashRouter.h>
|
||||
#include <ripple/app/misc/NetworkOPs.h>
|
||||
#include <ripple/app/tx/TransactionMaster.h>
|
||||
#include <ripple/basics/contract.h>
|
||||
#include <ripple/basics/Log.h>
|
||||
#include <ripple/basics/StringUtilities.h>
|
||||
@@ -179,7 +179,7 @@ Ledger::Ledger (create_genesis_t, Config const& config, Family& family)
|
||||
info_.seq = 1;
|
||||
info_.drops = SYSTEM_CURRENCY_START;
|
||||
info_.closeTimeResolution = ledgerDefaultTimeResolution;
|
||||
auto const id = calcAccountID(
|
||||
static auto const id = calcAccountID(
|
||||
generateKeyPair(KeyType::secp256k1,
|
||||
generateSeed("masterpassphrase")).first);
|
||||
auto const sle = std::make_shared<SLE>(keylet::account(id));
|
||||
@@ -198,10 +198,10 @@ Ledger::Ledger (uint256 const& parentHash,
|
||||
uint256 const& transHash,
|
||||
uint256 const& accountHash,
|
||||
std::uint64_t totDrops,
|
||||
std::uint32_t closeTime,
|
||||
std::uint32_t parentCloseTime,
|
||||
NetClock::time_point closeTime,
|
||||
NetClock::time_point parentCloseTime,
|
||||
int closeFlags,
|
||||
int closeResolution,
|
||||
NetClock::duration closeResolution,
|
||||
std::uint32_t ledgerSeq,
|
||||
bool& loaded,
|
||||
Config const& config,
|
||||
@@ -225,14 +225,14 @@ Ledger::Ledger (uint256 const& parentHash,
|
||||
loaded = true;
|
||||
|
||||
if (info_.txHash.isNonZero () &&
|
||||
!txMap_->fetchRoot (info_.txHash, nullptr))
|
||||
!txMap_->fetchRoot (SHAMapHash{info_.txHash}, nullptr))
|
||||
{
|
||||
loaded = false;
|
||||
JLOG (j.warning) << "Don't have TX root for ledger";
|
||||
}
|
||||
|
||||
if (info_.accountHash.isNonZero () &&
|
||||
!stateMap_->fetchRoot (info_.accountHash, nullptr))
|
||||
!stateMap_->fetchRoot (SHAMapHash{info_.accountHash}, nullptr))
|
||||
{
|
||||
loaded = false;
|
||||
JLOG (j.warning) << "Don't have AS root for ledger";
|
||||
@@ -243,7 +243,7 @@ Ledger::Ledger (uint256 const& parentHash,
|
||||
|
||||
if (! setup(config))
|
||||
loaded = false;
|
||||
|
||||
|
||||
if (! loaded)
|
||||
{
|
||||
updateHash ();
|
||||
@@ -280,14 +280,12 @@ Ledger::Ledger (open_ledger_t, Ledger const& prevLedger,
|
||||
info_.drops = prevLedger.info().drops;
|
||||
info_.closeTimeResolution = prevLedger.info_.closeTimeResolution;
|
||||
info_.parentHash = prevLedger.getHash ();
|
||||
info_.closeTimeResolution = getNextLedgerTimeResolution (
|
||||
info_.closeTimeResolution = getNextLedgerTimeResolution(
|
||||
prevLedger.info_.closeTimeResolution,
|
||||
getCloseAgree(prevLedger.info()), info_.seq);
|
||||
if (prevLedger.info_.closeTime == 0)
|
||||
if (prevLedger.info_.closeTime == NetClock::time_point{})
|
||||
{
|
||||
info_.closeTime = roundCloseTime (
|
||||
closeTime.time_since_epoch().count(),
|
||||
info_.closeTimeResolution);
|
||||
info_.closeTime = roundCloseTime(closeTime, info_.closeTimeResolution);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -311,7 +309,7 @@ Ledger::Ledger (void const* data,
|
||||
}
|
||||
|
||||
Ledger::Ledger (std::uint32_t ledgerSeq,
|
||||
std::uint32_t closeTime, Config const& config,
|
||||
NetClock::time_point closeTime, Config const& config,
|
||||
Family& family)
|
||||
: mImmutable (false)
|
||||
, txMap_ (std::make_shared <SHAMap> (
|
||||
@@ -350,12 +348,12 @@ void Ledger::updateHash()
|
||||
if (! mImmutable)
|
||||
{
|
||||
if (txMap_)
|
||||
info_.txHash = txMap_->getHash ();
|
||||
info_.txHash = txMap_->getHash ().as_uint256();
|
||||
else
|
||||
info_.txHash.zero ();
|
||||
|
||||
if (stateMap_)
|
||||
info_.accountHash = stateMap_->getHash ();
|
||||
info_.accountHash = stateMap_->getHash ().as_uint256();
|
||||
else
|
||||
info_.accountHash.zero ();
|
||||
}
|
||||
@@ -368,9 +366,9 @@ void Ledger::updateHash()
|
||||
info_.parentHash,
|
||||
info_.txHash,
|
||||
info_.accountHash,
|
||||
std::uint32_t(info_.parentCloseTime),
|
||||
std::uint32_t(info_.closeTime),
|
||||
std::uint8_t(info_.closeTimeResolution),
|
||||
std::uint32_t(info_.parentCloseTime.time_since_epoch().count()),
|
||||
std::uint32_t(info_.closeTime.time_since_epoch().count()),
|
||||
std::uint8_t(info_.closeTimeResolution.count()),
|
||||
std::uint8_t(info_.closeFlags));
|
||||
mValidHash = true;
|
||||
}
|
||||
@@ -385,9 +383,9 @@ void Ledger::setRaw (SerialIter& sit, bool hasPrefix, Family& family)
|
||||
info_.parentHash = sit.get256 ();
|
||||
info_.txHash = sit.get256 ();
|
||||
info_.accountHash = sit.get256 ();
|
||||
info_.parentCloseTime = sit.get32 ();
|
||||
info_.closeTime = sit.get32 ();
|
||||
info_.closeTimeResolution = sit.get8 ();
|
||||
info_.parentCloseTime = NetClock::time_point{NetClock::duration{sit.get32()}};
|
||||
info_.closeTime = NetClock::time_point{NetClock::duration{sit.get32()}};
|
||||
info_.closeTimeResolution = NetClock::duration{sit.get8()};
|
||||
info_.closeFlags = sit.get8 ();
|
||||
updateHash ();
|
||||
txMap_ = std::make_shared<SHAMap> (SHAMapType::TRANSACTION, info_.txHash,
|
||||
@@ -401,12 +399,12 @@ void Ledger::addRaw (Serializer& s) const
|
||||
ripple::addRaw(info_, s);
|
||||
}
|
||||
|
||||
void Ledger::setAccepted (
|
||||
std::uint32_t closeTime, int closeResolution, bool correctCloseTime,
|
||||
Config const& config)
|
||||
void
|
||||
Ledger::setAccepted(NetClock::time_point closeTime,
|
||||
NetClock::duration closeResolution,
|
||||
bool correctCloseTime, Config const& config)
|
||||
{
|
||||
// Used when we witnessed the consensus. Rounds the close time, updates the
|
||||
// hash, and sets the ledger accepted and immutable.
|
||||
// Used when we witnessed the consensus.
|
||||
assert (closed());
|
||||
|
||||
info_.closeTime = closeTime;
|
||||
@@ -457,7 +455,7 @@ deserializeTxPlusMeta (SHAMapItem const& item)
|
||||
void Ledger::setAcquiring (void)
|
||||
{
|
||||
if (!txMap_ || !stateMap_)
|
||||
throw std::runtime_error ("invalid map");
|
||||
Throw<std::runtime_error> ("invalid map");
|
||||
|
||||
txMap_->setSynching ();
|
||||
stateMap_->setSynching ();
|
||||
@@ -478,17 +476,6 @@ bool Ledger::isAcquiringAS (void) const
|
||||
return stateMap_->isSynching ();
|
||||
}
|
||||
|
||||
boost::posix_time::ptime Ledger::getCloseTime () const
|
||||
{
|
||||
return ptFromSeconds (info_.closeTime);
|
||||
}
|
||||
|
||||
void Ledger::setCloseTime (boost::posix_time::ptime ptm)
|
||||
{
|
||||
assert (!mImmutable);
|
||||
info_.closeTime = iToSeconds (ptm);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
bool
|
||||
@@ -610,12 +597,12 @@ auto
|
||||
Ledger::digest (key_type const& key) const ->
|
||||
boost::optional<digest_type>
|
||||
{
|
||||
digest_type digest;
|
||||
SHAMapHash digest;
|
||||
// VFALCO Unfortunately this loads the item
|
||||
// from the NodeStore needlessly.
|
||||
if (! stateMap_->peekItem(key, digest))
|
||||
return boost::none;
|
||||
return digest;
|
||||
return digest.as_uint256();
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@@ -722,12 +709,11 @@ Ledger::setup (Config const& config)
|
||||
{
|
||||
ret = false;
|
||||
}
|
||||
catch (...)
|
||||
catch (std::exception const&)
|
||||
{
|
||||
throw;
|
||||
Throw();
|
||||
}
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
rules_ = Rules(*this);
|
||||
@@ -736,9 +722,9 @@ Ledger::setup (Config const& config)
|
||||
{
|
||||
ret = false;
|
||||
}
|
||||
catch (...)
|
||||
catch (std::exception const&)
|
||||
{
|
||||
throw;
|
||||
Throw();
|
||||
}
|
||||
|
||||
return ret;
|
||||
@@ -757,9 +743,7 @@ Ledger::peek (Keylet const& k) const
|
||||
return nullptr;
|
||||
// VFALCO TODO Eliminate "immutable" runtime property
|
||||
sle->setImmutable();
|
||||
// need move otherwise makes a copy
|
||||
// because return type is different
|
||||
return std::move(sle);
|
||||
return sle;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@@ -786,7 +770,7 @@ void Ledger::visitStateItems (std::function<void (SLE::ref)> callback) const
|
||||
catch (SHAMapMissingNode&)
|
||||
{
|
||||
stateMap_->family().missing_node (info_.hash);
|
||||
throw;
|
||||
Throw();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -797,9 +781,9 @@ bool Ledger::walkLedger (beast::Journal j) const
|
||||
|
||||
if (stateMap_->getHash().isZero() &&
|
||||
! info_.accountHash.isZero() &&
|
||||
! stateMap_->fetchRoot (info_.accountHash, nullptr))
|
||||
! stateMap_->fetchRoot (SHAMapHash{info_.accountHash}, nullptr))
|
||||
{
|
||||
missingNodes1.emplace_back (SHAMapType::STATE, info_.accountHash);
|
||||
missingNodes1.emplace_back (SHAMapType::STATE, SHAMapHash{info_.accountHash});
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -816,9 +800,9 @@ bool Ledger::walkLedger (beast::Journal j) const
|
||||
|
||||
if (txMap_->getHash().isZero() &&
|
||||
info_.txHash.isNonZero() &&
|
||||
! txMap_->fetchRoot (info_.txHash, nullptr))
|
||||
! txMap_->fetchRoot (SHAMapHash{info_.txHash}, nullptr))
|
||||
{
|
||||
missingNodes2.emplace_back (SHAMapType::TRANSACTION, info_.txHash);
|
||||
missingNodes2.emplace_back (SHAMapType::TRANSACTION, SHAMapHash{info_.txHash});
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -842,8 +826,8 @@ bool Ledger::assertSane (beast::Journal ledgerJ)
|
||||
info_.accountHash.isNonZero () &&
|
||||
stateMap_ &&
|
||||
txMap_ &&
|
||||
(info_.accountHash == stateMap_->getHash ()) &&
|
||||
(info_.txHash == txMap_->getHash ()))
|
||||
(info_.accountHash == stateMap_->getHash ().as_uint256()) &&
|
||||
(info_.txHash == txMap_->getHash ().as_uint256()))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -930,8 +914,16 @@ void Ledger::updateSkipList ()
|
||||
static bool saveValidatedLedger (
|
||||
Application& app, std::shared_ptr<Ledger> const& ledger, bool current)
|
||||
{
|
||||
// TODO(tom): Fix this hard-coded SQL!
|
||||
auto j = app.journal ("Ledger");
|
||||
|
||||
if (! app.pendingSaves().startWork (ledger->info().seq))
|
||||
{
|
||||
// The save was completed synchronously
|
||||
JLOG (j.debug) << "Save aborted";
|
||||
return true;
|
||||
}
|
||||
|
||||
// TODO(tom): Fix this hard-coded SQL!
|
||||
JLOG (j.trace)
|
||||
<< "saveValidatedLedger "
|
||||
<< (current ? "" : "fromAcquire ") << ledger->info().seq;
|
||||
@@ -963,7 +955,7 @@ static bool saveValidatedLedger (
|
||||
assert (false);
|
||||
}
|
||||
|
||||
if (ledger->info().accountHash != ledger->stateMap().getHash ())
|
||||
if (ledger->info().accountHash != ledger->stateMap().getHash ().as_uint256())
|
||||
{
|
||||
JLOG (j.fatal) << "sAL: " << ledger->info().accountHash
|
||||
<< " != " << ledger->stateMap().getHash ();
|
||||
@@ -972,7 +964,7 @@ static bool saveValidatedLedger (
|
||||
assert (false);
|
||||
}
|
||||
|
||||
assert (ledger->info().txHash == ledger->txMap().getHash ());
|
||||
assert (ledger->info().txHash == ledger->txMap().getHash ().as_uint256());
|
||||
|
||||
// Save the ledger header in the hashed object store
|
||||
{
|
||||
@@ -994,13 +986,13 @@ static bool saveValidatedLedger (
|
||||
app.getAcceptedLedgerCache().canonicalize(ledger->info().hash, aLedger);
|
||||
}
|
||||
}
|
||||
catch (...)
|
||||
catch (std::exception const&)
|
||||
{
|
||||
JLOG (j.warning) << "An accepted ledger was missing nodes";
|
||||
app.getLedgerMaster().failedSave(seq, ledger->info().hash);
|
||||
// Clients can now trust the database for information about this
|
||||
// ledger sequence.
|
||||
app.pendingSaves().erase(seq);
|
||||
app.pendingSaves().finishWork(seq);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1092,15 +1084,17 @@ static bool saveValidatedLedger (
|
||||
*db << boost::str (
|
||||
addLedger %
|
||||
to_string (ledger->info().hash) % seq % to_string (ledger->info().parentHash) %
|
||||
to_string (ledger->info().drops) % ledger->info().closeTime %
|
||||
ledger->info().parentCloseTime % ledger->info().closeTimeResolution %
|
||||
to_string (ledger->info().drops) %
|
||||
ledger->info().closeTime.time_since_epoch().count() %
|
||||
ledger->info().parentCloseTime.time_since_epoch().count() %
|
||||
ledger->info().closeTimeResolution.count() %
|
||||
ledger->info().closeFlags % to_string (ledger->info().accountHash) %
|
||||
to_string (ledger->info().txHash));
|
||||
}
|
||||
|
||||
// Clients can now trust the database for
|
||||
// information about this ledger sequence.
|
||||
app.pendingSaves().erase(seq);
|
||||
app.pendingSaves().finishWork(seq);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1112,18 +1106,28 @@ bool pendSaveValidated (Application& app,
|
||||
{
|
||||
if (! app.getHashRouter ().setFlags (ledger->info().hash, SF_SAVED))
|
||||
{
|
||||
// We have tried to save this ledger recently
|
||||
|
||||
JLOG (app.journal ("Ledger").debug) << "Double pend save for "
|
||||
<< ledger->info().seq;
|
||||
return true;
|
||||
|
||||
if (! isSynchronous ||
|
||||
! app.pendingSaves().pending (ledger->info().seq))
|
||||
{
|
||||
// Either we don't need it to be finished
|
||||
// or it is finished
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
assert (ledger->isImmutable ());
|
||||
|
||||
if (! app.pendingSaves().insert (ledger->info().seq))
|
||||
if (! app.pendingSaves().shouldWork (ledger->info().seq, isSynchronous))
|
||||
{
|
||||
JLOG (app.journal ("Ledger").debug)
|
||||
<< "Pend save with seq in pending saves "
|
||||
<< ledger->info().seq;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1272,15 +1276,17 @@ loadLedgerHelper(std::string const& sqlSuffix, Application& app)
|
||||
if (sTransHash)
|
||||
transHash.SetHexExact (*sTransHash);
|
||||
|
||||
using time_point = NetClock::time_point;
|
||||
using duration = NetClock::duration;
|
||||
bool loaded = false;
|
||||
ledger = std::make_shared<Ledger>(prevHash,
|
||||
transHash,
|
||||
accountHash,
|
||||
totDrops.value_or(0),
|
||||
closingTime.value_or(0),
|
||||
prevClosingTime.value_or(0),
|
||||
time_point{duration{closingTime.value_or(0)}},
|
||||
time_point{duration{prevClosingTime.value_or(0)}},
|
||||
closeFlags.value_or(0),
|
||||
closeResolution.value_or(0),
|
||||
duration{closeResolution.value_or(0)},
|
||||
ledgerSeq,
|
||||
loaded,
|
||||
app.config(),
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user