Skip to content

Commit 794d224

Browse files
committed
Merge pull request #94 from libbitcoin/master
Merge master to version2.
2 parents e04ab9f + 9e628a6 commit 794d224

73 files changed

Lines changed: 1776 additions & 954 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ Makefile
88
Makefile.in
99
libobelisk.pc
1010

11+
/.cproject
12+
/.project
1113
/aclocal.m4
1214
/autom4te.cache
1315
/build-aux

.travis.yml

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ install:
5151
- if [[ $LINUX ]]; then sudo apt-get install -qq g++-4.8 --allow-unauthenticated; fi
5252
- if [[ $LINUX ]]; then sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 50; fi
5353
- if [[ $LINUX ]]; then sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 50; fi
54+
- if [[ $LINUX ]]; then sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-4.8 50; fi
5455

5556
# Install clang++ 3.4
5657
- if [[ $LINUX && $CLANG ]]; then sudo apt-get install -qq clang-3.4 --allow-unauthenticated; fi
@@ -72,9 +73,25 @@ install:
7273
script:
7374

7475
# Download and build libbitcoin-server and all dependencies.
75-
- if [[ $OSX && $CLANG && $STATIC ]]; then ./install.sh --without-consensus --with-secp256k1 --without-openssl --enable-testnet --disable-shared --build-boost --prefix=$HOME/my-prefix; fi
76-
- if [[ $LINUX && $CLANG && $STATIC ]]; then ./install.sh --with-secp256k1 --without-openssl --disable-shared --build-boost --prefix=$HOME/my-prefix CXXFLAGS='-Os -stdlib=libstdc++' LDLIBS='-lstdc++'; fi
77-
- if [[ $LINUX && $GCC && $STATIC ]]; then ./install.sh --disable-ndebug --disable-shared --build-boost --prefix=$HOME/my-prefix --build-dir=my-build --with-bash-completiondir CXXFLAGS='-Os -s -static'; fi
76+
- if [[ $OSX && $CLANG && $STATIC ]]; then ./install.sh --without-consensus --with-secp256k1 --without-openssl --enable-testnet --disable-shared --build-boost --prefix=$TRAVIS_BUILD_DIR/my-prefix; fi
77+
- if [[ $LINUX && $CLANG && $STATIC ]]; then ./install.sh --with-secp256k1 --without-openssl --disable-shared --build-boost --prefix=$TRAVIS_BUILD_DIR/my-prefix CFLAGS='-Os' LDLIBS='-lstdc++' CXXFLAGS='-Os -stdlib=libstdc++'; fi
78+
- if [[ $LINUX && $GCC && $STATIC ]]; then ./install.sh --build-boost --disable-shared --build-dir=my-build --prefix=$TRAVIS_BUILD_DIR/my-prefix --with-bash-completiondir CFLAGS='-O0 -g -static --coverage' CXXFLAGS='-O0 -g -static --coverage'; fi
7879
- if [[ $OSX && $CLANG && $DYNAMIC ]]; then ./install.sh --with-secp256k1 --without-openssl --with-bash-completiondir; fi
79-
- if [[ $LINUX && $CLANG && $DYNAMIC ]]; then sudo CXX=$CXX CC=$CC ./install.sh --disable-ndebug --disable-static CXXFLAGS='-Os -stdlib=libstdc++' LDLIBS='-lstdc++'; fi
80-
- if [[ $LINUX && $GCC && $DYNAMIC ]]; then sudo CXX=$CXX CC=$CC ./install.sh --without-consensus --disable-static --build-boost --with-bash-completiondir CXXFLAGS='-Os -s'; fi
80+
- if [[ $LINUX && $CLANG && $DYNAMIC ]]; then sudo CXX=$CXX CC=$CC ./install.sh --disable-ndebug --disable-static CFLAGS='-Os' LDLIBS='-lstdc++' CXXFLAGS='-Os -stdlib=libstdc++'; fi
81+
- if [[ $LINUX && $GCC && $DYNAMIC ]]; then sudo CXX=$CXX CC=$CC ./install.sh --without-consensus --disable-static --build-boost --with-bash-completiondir CFLAGS='-Os -s' CXXFLAGS='-Os -s'; fi
82+
83+
after_success:
84+
85+
# Install coveralls and current lcov.
86+
- if [[ $LINUX && $GCC && $STATIC ]]; then wget http://ftp.de.debian.org/debian/pool/main/l/lcov/lcov_1.11.orig.tar.gz; fi
87+
- if [[ $LINUX && $GCC && $STATIC ]]; then tar xf lcov_1.11.orig.tar.gz; fi
88+
- if [[ $LINUX && $GCC && $STATIC ]]; then sudo make -C lcov-1.11 install; fi
89+
- if [[ $LINUX && $GCC && $STATIC ]]; then gem install coveralls-lcov; fi
90+
91+
# Capture coverage info, filter out system and test code, and debug before upload.
92+
- if [[ $LINUX && $GCC && $STATIC ]]; then lcov --directory . --capture --output-file coverage.info; fi
93+
- if [[ $LINUX && $GCC && $STATIC ]]; then lcov --remove coverage.info "/usr/*" "$TRAVIS_BUILD_DIR/my-prefix/*" "my-build/*" "test/*" --output-file coverage.info; fi
94+
- if [[ $LINUX && $GCC && $STATIC ]]; then lcov --list coverage.info; fi
95+
96+
# Upload coverage info to coveralls service (--repo-token <private coveralls repo token>).
97+
- if [[ $LINUX && $GCC && $STATIC ]]; then coveralls-lcov coverage.info; fi

Makefile.am

Lines changed: 82 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -29,48 +29,87 @@ doc_DATA = \
2929
NEWS \
3030
README
3131

32-
# src/bs => ${bindir}
32+
# src/libbitcoin-server.la => ${libdir}
3333
#------------------------------------------------------------------------------
34-
bin_PROGRAMS = src/bs
35-
src_bs_CPPFLAGS = -I${srcdir}/include -DSYSCONFDIR=\"${sysconfdir}\" ${bitcoin_node_CPPFLAGS} ${sodium_CPPFLAGS} ${czmq___CPPFLAGS}
36-
src_bs_LDADD = ${bitcoin_node_LIBS} ${sodium_LIBS} ${czmq___LIBS}
37-
src_bs_SOURCES = \
38-
src/config.cpp \
39-
src/config.hpp \
40-
src/echo.cpp \
41-
src/echo.hpp \
42-
src/endpoint.cpp \
43-
src/endpoint.hpp \
44-
src/main.cpp \
34+
lib_LTLIBRARIES = src/libbitcoin-server.la
35+
src_libbitcoin_server_la_CPPFLAGS = -I${srcdir}/include -DSYSCONFDIR=\"${sysconfdir}\" ${bitcoin_node_CPPFLAGS} ${sodium_CPPFLAGS} ${czmq___CPPFLAGS}
36+
src_libbitcoin_server_la_LIBADD = ${bitcoin_node_LIBS} ${sodium_LIBS} ${czmq___LIBS}
37+
src_libbitcoin_server_la_SOURCES = \
38+
src/dispatch.cpp \
4539
src/message.cpp \
46-
src/message.hpp \
47-
src/node_impl.cpp \
48-
src/node_impl.hpp \
4940
src/publisher.cpp \
50-
src/publisher.hpp \
51-
src/server.cpp \
52-
src/server.hpp \
53-
src/settings.cpp \
54-
src/settings.hpp \
41+
src/server_node.cpp \
5542
src/subscribe_manager.cpp \
56-
src/subscribe_manager.hpp \
57-
src/version.hpp \
58-
src/worker-output.sh \
5943
src/worker.cpp \
60-
src/worker.hpp \
44+
src/config/config.cpp \
45+
src/config/endpoint.cpp \
46+
src/config/settings.cpp \
6147
src/service/blockchain.cpp \
62-
src/service/blockchain.hpp \
6348
src/service/compat.cpp \
64-
src/service/compat.hpp \
6549
src/service/fetch_x.cpp \
66-
src/service/fetch_x.hpp \
67-
src/service/fullnode.cpp \
68-
src/service/fullnode.hpp \
6950
src/service/protocol.cpp \
70-
src/service/protocol.hpp \
71-
src/service/transaction_pool.cpp \
72-
src/service/transaction_pool.hpp \
73-
src/service/util.hpp
51+
src/service/transaction_pool.cpp
52+
53+
# local: test/libbitcoin_server_test
54+
#------------------------------------------------------------------------------
55+
if WITH_TESTS
56+
57+
TESTS = libbitcoin_server_test_runner.sh
58+
59+
check_PROGRAMS = test/libbitcoin_server_test
60+
test_libbitcoin_server_test_CPPFLAGS = -I${srcdir}/include ${bitcoin_node_CPPFLAGS} ${sodium_CPPFLAGS} ${czmq___CPPFLAGS}
61+
test_libbitcoin_server_test_LDADD = src/libbitcoin-server.la ${boost_unit_test_framework_LIBS} ${bitcoin_node_LIBS} ${sodium_LIBS} ${czmq___LIBS}
62+
test_libbitcoin_server_test_SOURCES = \
63+
test/endpoint.cpp \
64+
test/main.cpp \
65+
test/server.cpp \
66+
test/stress.sh
67+
68+
endif WITH_TESTS
69+
70+
# console/bs => ${bindir}
71+
#------------------------------------------------------------------------------
72+
if WITH_CONSOLE
73+
74+
bin_PROGRAMS = console/bs
75+
console_bs_CPPFLAGS = -I${srcdir}/include ${bitcoin_node_CPPFLAGS} ${sodium_CPPFLAGS} ${czmq___CPPFLAGS}
76+
console_bs_LDADD = src/libbitcoin-server.la ${bitcoin_node_LIBS} ${sodium_LIBS} ${czmq___LIBS}
77+
console_bs_SOURCES = \
78+
console/main.cpp
79+
80+
endif WITH_CONSOLE
81+
82+
# files => ${includedir}/bitcoin
83+
#------------------------------------------------------------------------------
84+
include_bitcoindir = ${includedir}/bitcoin
85+
include_bitcoin_HEADERS = \
86+
include/bitcoin/server.hpp
87+
88+
include_bitcoin_serverdir = ${includedir}/bitcoin/server
89+
include_bitcoin_server_HEADERS = \
90+
include/bitcoin/server/define.hpp \
91+
include/bitcoin/server/dispatch.hpp \
92+
include/bitcoin/server/message.hpp \
93+
include/bitcoin/server/publisher.hpp \
94+
include/bitcoin/server/server_node.hpp \
95+
include/bitcoin/server/subscribe_manager.hpp \
96+
include/bitcoin/server/version.hpp \
97+
include/bitcoin/server/worker.hpp
98+
99+
include_bitcoin_server_configdir = ${includedir}/bitcoin/server/config
100+
include_bitcoin_server_config_HEADERS = \
101+
include/bitcoin/server/config/config.hpp \
102+
include/bitcoin/server/config/endpoint.hpp \
103+
include/bitcoin/server/config/settings.hpp
104+
105+
include_bitcoin_server_servicedir = ${includedir}/bitcoin/server/service
106+
include_bitcoin_server_service_HEADERS = \
107+
include/bitcoin/server/service/blockchain.hpp \
108+
include/bitcoin/server/service/compat.hpp \
109+
include/bitcoin/server/service/fetch_x.hpp \
110+
include/bitcoin/server/service/protocol.hpp \
111+
include/bitcoin/server/service/transaction_pool.hpp \
112+
include/bitcoin/server/service/util.hpp
74113

75114
# files => ${bash_completiondir}
76115
#------------------------------------------------------------------------------
@@ -87,3 +126,13 @@ sysconf_libbitcoindir = ${sysconfdir}/libbitcoin
87126
sysconf_libbitcoin_DATA = \
88127
data/bs.cfg
89128

129+
130+
# Custom make targets.
131+
#==============================================================================
132+
# make target: console
133+
#------------------------------------------------------------------------------
134+
target_console = \
135+
console/bs
136+
137+
console: ${target_console}
138+

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
[![Build Status](https://travis-ci.org/libbitcoin/libbitcoin-server.svg?branch=master)](https://travis-ci.org/libbitcoin/libbitcoin-server)
22

3+
[![Coverage Status](https://coveralls.io/repos/libbitcoin/libbitcoin-server/badge.svg)](https://coveralls.io/r/libbitcoin/libbitcoin-server)
4+
35
# Libbitcoin Server
46

57
*Bitcoin full node and query server*
68

79
[Documentation](https://github.com/libbitcoin/libbitcoin-server/wiki) is available on the wiki.
810

9-
[Downloads](https://github.com/libbitcoin/libbitcoin-server/wiki/Download-Libbitcoin-Server) are available for Linux, Macintosh and Windows.
11+
[Downloads](https://github.com/libbitcoin/libbitcoin-server/wiki/Download-BS) are available for Linux, Macintosh and Windows.
1012

1113
**License Overview**
1214

@@ -26,7 +28,7 @@ The API is backward compatible with its predecessor [Obelisk](https://github.com
2628

2729
## Installation
2830

29-
Libbitcoin Server can be built from sources or downloaded as a signed portable [single file executable](https://github.com/libbitcoin/libbitcoin-server/wiki/Download).
31+
Libbitcoin Server can be built from sources or downloaded as a signed portable [single file executable](https://github.com/libbitcoin/libbitcoin-server/wiki/Download-BS).
3032

3133
On Linux and Macintosh Libbitcoin Server is built using Autotools as follows.
3234
```sh

builds/msvc/properties/DLL.props

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
4+
<PropertyGroup>
5+
<_PropertySheetDisplayName>Dynamic Library</_PropertySheetDisplayName>
6+
<DefaultLinkage>dynamic</DefaultLinkage>
7+
<TargetExt>.dll</TargetExt>
8+
</PropertyGroup>
9+
10+
<ItemDefinitionGroup>
11+
<ClCompile>
12+
<PreprocessorDefinitions>_DLL;_WINDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
13+
</ClCompile>
14+
</ItemDefinitionGroup>
15+
16+
</Project>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
4+
<PropertyGroup>
5+
<_PropertySheetDisplayName>Dynamic Debug Library</_PropertySheetDisplayName>
6+
</PropertyGroup>
7+
8+
<ImportGroup Label="PropertySheets">
9+
<Import Project="Debug.props" />
10+
<Import Project="DLL.props" />
11+
</ImportGroup>
12+
13+
<ItemDefinitionGroup>
14+
<ClCompile>
15+
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
16+
<LinkIncremental>true</LinkIncremental>
17+
</ClCompile>
18+
</ItemDefinitionGroup>
19+
20+
</Project>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
4+
<PropertyGroup>
5+
<_PropertySheetDisplayName>Static Debug Library</_PropertySheetDisplayName>
6+
</PropertyGroup>
7+
8+
<ImportGroup Label="PropertySheets">
9+
<Import Project="Debug.props" />
10+
<Import Project="LIB.props" />
11+
</ImportGroup>
12+
13+
<ItemDefinitionGroup>
14+
<ClCompile>
15+
<DebugInformationFormat>OldStyle</DebugInformationFormat>
16+
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
17+
<LinkIncremental>true</LinkIncremental>
18+
</ClCompile>
19+
</ItemDefinitionGroup>
20+
21+
</Project>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
4+
<PropertyGroup>
5+
<_PropertySheetDisplayName>Static Debug Link Time Code Generation Library</_PropertySheetDisplayName>
6+
</PropertyGroup>
7+
8+
<ImportGroup Label="PropertySheets">
9+
<Import Project="Debug.props" />
10+
<Import Project="LTCG.props" />
11+
</ImportGroup>
12+
13+
<ItemDefinitionGroup>
14+
<ClCompile>
15+
<DebugInformationFormat>OldStyle</DebugInformationFormat>
16+
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
17+
</ClCompile>
18+
</ItemDefinitionGroup>
19+
20+
</Project>

builds/msvc/properties/LIB.props

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
4+
<PropertyGroup>
5+
<_PropertySheetDisplayName>Static Library</_PropertySheetDisplayName>
6+
<DefaultLinkage>static</DefaultLinkage>
7+
<TargetExt>.lib</TargetExt>
8+
</PropertyGroup>
9+
10+
<ItemDefinitionGroup>
11+
<ClCompile>
12+
<PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
13+
</ClCompile>
14+
</ItemDefinitionGroup>
15+
16+
</Project>

builds/msvc/properties/LTCG.props

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
4+
<PropertyGroup>
5+
<_PropertySheetDisplayName>Link Time Code Generation Library</_PropertySheetDisplayName>
6+
</PropertyGroup>
7+
8+
<ImportGroup Label="PropertySheets">
9+
<Import Project="LIB.props" />
10+
<Import Project="Link.props" />
11+
</ImportGroup>
12+
13+
</Project>

0 commit comments

Comments
 (0)