Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ script:
# Download and build libbitcoin-server and all dependencies.
- if [[ $OSX && $CLANG && $STATIC ]]; then CC=$CC CXX=$CXX ./install.sh --enable-isystem --without-consensus --disable-shared --build-boost --build-zmq --prefix=$TRAVIS_BUILD_DIR/my-prefix; fi
- if [[ $LINUX && $CLANG && $STATIC ]]; then CC=$CC CXX=$CXX ./install.sh --enable-isystem --disable-shared --build-boost --build-zmq --prefix=$TRAVIS_BUILD_DIR/my-prefix CFLAGS='-Os' CXXFLAGS='-Os'; fi
- if [[ $LINUX && $GCC && $STATIC ]]; then CC=$CC CXX=$CXX ./install.sh --enable-isystem --build-boost --build-zmq --build-mbedtls --disable-shared --build-dir=my-build --prefix=$TRAVIS_BUILD_DIR/my-prefix --with-bash-completiondir=$TRAVIS_BUILD_DIR/my-prefix/share/bash-completion/completions CFLAGS='-Og -g --coverage' CXXFLAGS='-Og -g --coverage'; fi
- if [[ $OSX && $CLANG && $DYNAMIC ]]; then CC=$CC CXX=$CXX ./install.sh --enable-isystem --build-zmq --build-mbedtls --disable-static --with-bash-completiondir; fi
- if [[ $LINUX && $CLANG && $DYNAMIC ]]; then CC=$CC CXX=$CXX ./install.sh --enable-isystem --build-boost --build-zmq --build-mbedtls --disable-ndebug --disable-static --prefix=$TRAVIS_BUILD_DIR/my-prefix CFLAGS='-Os' CXXFLAGS='-Os'; fi
- if [[ $LINUX && $GCC && $STATIC ]]; then CC=$CC CXX=$CXX ./install.sh --enable-isystem --build-boost --build-zmq --disable-shared --build-dir=my-build --prefix=$TRAVIS_BUILD_DIR/my-prefix --with-bash-completiondir=$TRAVIS_BUILD_DIR/my-prefix/share/bash-completion/completions CFLAGS='-Og -g --coverage' CXXFLAGS='-Og -g --coverage'; fi
- if [[ $OSX && $CLANG && $DYNAMIC ]]; then CC=$CC CXX=$CXX ./install.sh --enable-isystem --build-zmq --disable-static --with-bash-completiondir; fi
- if [[ $LINUX && $CLANG && $DYNAMIC ]]; then CC=$CC CXX=$CXX ./install.sh --enable-isystem --build-boost --build-zmq --disable-ndebug --disable-static --prefix=$TRAVIS_BUILD_DIR/my-prefix CFLAGS='-Os' CXXFLAGS='-Os'; fi
- if [[ $LINUX && $GCC && $DYNAMIC ]]; then CC=$CC CXX=$CXX ./install.sh --enable-isystem --without-consensus --disable-static --build-boost --build-zmq --with-bash-completiondir=$TRAVIS_BUILD_DIR/my-prefix/share/bash-completion/completions --prefix=$TRAVIS_BUILD_DIR/my-prefix CFLAGS='-Os -s' CXXFLAGS='-Os -s'; fi

after_success:
Expand Down
2 changes: 1 addition & 1 deletion COPYING
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
This license applies to all works under this directory.

Libbitcoin - C++ Bitcoin Development Toolkit and Applications
Copyright © 2011-2017 libbitcoin developers (see AUTHORS)
Copyright © 2011-2018 libbitcoin developers (see AUTHORS)

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
Expand Down
12 changes: 6 additions & 6 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ doc_DATA = \
# src/libbitcoin-server.la => ${libdir}
#------------------------------------------------------------------------------
lib_LTLIBRARIES = src/libbitcoin-server.la
src_libbitcoin_server_la_CPPFLAGS = -I${srcdir}/include -DSYSCONFDIR=\"${sysconfdir}\" ${mbedtls} ${bitcoin_protocol_BUILD_CPPFLAGS} ${bitcoin_node_BUILD_CPPFLAGS} ${mbedtls_BUILD_CPPFLAGS}
src_libbitcoin_server_la_LIBADD = ${bitcoin_protocol_LIBS} ${bitcoin_node_LIBS} ${mbedtls_LIBS}
src_libbitcoin_server_la_CPPFLAGS = -I${srcdir}/include -DSYSCONFDIR=\"${sysconfdir}\" ${bitcoin_protocol_BUILD_CPPFLAGS} ${bitcoin_node_BUILD_CPPFLAGS}
src_libbitcoin_server_la_LIBADD = ${bitcoin_protocol_LIBS} ${bitcoin_node_LIBS}
src_libbitcoin_server_la_SOURCES = \
src/configuration.cpp \
src/parser.cpp \
Expand Down Expand Up @@ -61,8 +61,8 @@ if WITH_TESTS
TESTS = libbitcoin-server-test_runner.sh

check_PROGRAMS = test/libbitcoin-server-test
test_libbitcoin_server_test_CPPFLAGS = -I${srcdir}/include ${mbedtls} ${bitcoin_protocol_BUILD_CPPFLAGS} ${bitcoin_node_BUILD_CPPFLAGS} ${mbedtls_BUILD_CPPFLAGS}
test_libbitcoin_server_test_LDADD = src/libbitcoin-server.la ${boost_unit_test_framework_LIBS} ${bitcoin_protocol_LIBS} ${bitcoin_node_LIBS} ${mbedtls_LIBS}
test_libbitcoin_server_test_CPPFLAGS = -I${srcdir}/include ${bitcoin_protocol_BUILD_CPPFLAGS} ${bitcoin_node_BUILD_CPPFLAGS}
test_libbitcoin_server_test_LDADD = src/libbitcoin-server.la ${boost_unit_test_framework_LIBS} ${bitcoin_protocol_LIBS} ${bitcoin_node_LIBS}
test_libbitcoin_server_test_SOURCES = \
test/main.cpp \
test/server.cpp \
Expand All @@ -75,8 +75,8 @@ endif WITH_TESTS
if WITH_CONSOLE

bin_PROGRAMS = console/bs
console_bs_CPPFLAGS = -I${srcdir}/include ${mbedtls} ${bitcoin_protocol_BUILD_CPPFLAGS} ${bitcoin_node_BUILD_CPPFLAGS} ${mbedtls_BUILD_CPPFLAGS}
console_bs_LDADD = src/libbitcoin-server.la ${bitcoin_protocol_LIBS} ${bitcoin_node_LIBS} ${mbedtls_LIBS}
console_bs_CPPFLAGS = -I${srcdir}/include ${bitcoin_protocol_BUILD_CPPFLAGS} ${bitcoin_node_BUILD_CPPFLAGS}
console_bs_LDADD = src/libbitcoin-server.la ${bitcoin_protocol_LIBS} ${bitcoin_node_LIBS}
console_bs_SOURCES = \
console/executor.cpp \
console/executor.hpp \
Expand Down
56 changes: 11 additions & 45 deletions builds/cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,21 +42,12 @@ set( CMAKE_CXX_STANDARD_REQUIRED ON )
# Warn on all stuff.
add_compile_options( "-Wall" )

# Warn on all stuff.
add_compile_options( "-Wall" )

# Warn on extra stuff.
add_compile_options( "-Wextra" )

# Warn on extra stuff.
add_compile_options( "-Wextra" )

# Be really annoying.
add_compile_options( "-Wpedantic" )

# Be really annoying.
add_compile_options( "-Wpedantic" )

# Disallow warning on style order of declarations.
add_compile_options( "-Wno-reorder" )

Expand Down Expand Up @@ -90,14 +81,6 @@ set( with-tests "yes" CACHE BOOL "Compile with unit tests." )
#------------------------------------------------------------------------------
set( with-console "yes" CACHE BOOL "Compile console application." )

# Implement -Dwith-mbedtls and output ${mbedtls}.
#------------------------------------------------------------------------------
set( with-mbedtls "no" CACHE BOOL "Compile with MbedTLS." )

if (with-mbedtls)
set( mbedtls "-DWITH_MBEDTLS" )
endif()

# Implement -Denable-ndebug and define NDEBUG.
#------------------------------------------------------------------------------
set( enable-ndebug "yes" CACHE BOOL "Compile without debug assertions." )
Expand Down Expand Up @@ -142,38 +125,28 @@ find_package( Bitcoin-Node 4.0.0 REQUIRED )
#------------------------------------------------------------------------------
find_package( Bitcoin-Protocol 4.0.0 REQUIRED )

# Find mbedtls
#------------------------------------------------------------------------------
if (with-mbedtls)
find_package( Mbedtls REQUIRED )
endif()

# Define project common includes directories
#------------------------------------------------------------------------------
if (BUILD_SHARED_LIBS)
include_directories( SYSTEM
${bitcoin_protocol_INCLUDE_DIRS}
${bitcoin_node_INCLUDE_DIRS}
${mbedtls_INCLUDE_DIRS} )
${bitcoin_node_INCLUDE_DIRS} )
else()
include_directories( SYSTEM
${bitcoin_protocol_STATIC_INCLUDE_DIRS}
${bitcoin_node_STATIC_INCLUDE_DIRS}
${mbedtls_STATIC_INCLUDE_DIRS} )
${bitcoin_node_STATIC_INCLUDE_DIRS} )
endif()

# Define project common library directories
#------------------------------------------------------------------------------
if (BUILD_SHARED_LIBS)
link_directories(
${bitcoin_protocol_LIBRARY_DIRS}
${bitcoin_node_LIBRARY_DIRS}
${mbedtls_LIBRARY_DIRS} )
${bitcoin_node_LIBRARY_DIRS} )
else()
link_directories(
${bitcoin_protocol_STATIC_LIBRARY_DIRS}
${bitcoin_node_STATIC_LIBRARY_DIRS}
${mbedtls_STATIC_LIBRARY_DIRS} )
${bitcoin_node_STATIC_LIBRARY_DIRS} )
endif()

# Define project common libraries/linker flags.
Expand All @@ -183,20 +156,17 @@ if (BUILD_SHARED_LIBS)
"-fstack-protector"
"-fstack-protector-all"
${bitcoin_protocol_LIBRARIES}
${bitcoin_node_LIBRARIES}
${mbedtls_LIBRARIES} )
${bitcoin_node_LIBRARIES} )
else()
link_libraries(
"-fstack-protector"
"-fstack-protector-all"
${bitcoin_protocol_STATIC_LIBRARIES}
${bitcoin_node_STATIC_LIBRARIES}
${mbedtls_STATIC_LIBRARIES} )
${bitcoin_node_STATIC_LIBRARIES} )
endif()

add_definitions(
-DSYSCONFDIR=\"${sysconfdir}\"
${mbedtls} )
-DSYSCONFDIR=\"${sysconfdir}\" )

# Define ${CANONICAL_LIB_NAME} project.
#------------------------------------------------------------------------------
Expand Down Expand Up @@ -226,14 +196,12 @@ if (BUILD_SHARED_LIBS)
target_include_directories( ${CANONICAL_LIB_NAME} PRIVATE
"../../include"
${bitcoin_protocol_INCLUDE_DIRS}
${bitcoin_node_INCLUDE_DIRS}
${mbedtls_INCLUDE_DIRS} )
${bitcoin_node_INCLUDE_DIRS} )
else()
target_include_directories( ${CANONICAL_LIB_NAME} PRIVATE
"../../include"
${bitcoin_protocol_STATIC_INCLUDE_DIRS}
${bitcoin_node_STATIC_INCLUDE_DIRS}
${mbedtls_STATIC_INCLUDE_DIRS} )
${bitcoin_node_STATIC_INCLUDE_DIRS} )
endif()

target_include_directories( ${CANONICAL_LIB_NAME} PUBLIC
Expand All @@ -244,13 +212,11 @@ target_include_directories( ${CANONICAL_LIB_NAME} PUBLIC
if (BUILD_SHARED_LIBS)
target_link_libraries( ${CANONICAL_LIB_NAME}
${bitcoin_protocol_LIBRARIES}
${bitcoin_node_LIBRARIES}
${mbedtls_LIBRARIES} )
${bitcoin_node_LIBRARIES} )
else()
target_link_libraries( ${CANONICAL_LIB_NAME}
${bitcoin_protocol_STATIC_LIBRARIES}
${bitcoin_node_STATIC_LIBRARIES}
${mbedtls_STATIC_LIBRARIES} )
${bitcoin_node_STATIC_LIBRARIES} )
endif()

# Define libbitcoin-server-test project.
Expand Down
27 changes: 0 additions & 27 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -121,17 +121,6 @@ AC_ARG_WITH([console],
AC_MSG_RESULT([$with_console])
AM_CONDITIONAL([WITH_CONSOLE], [test x$with_console != xno])

# Implement --with-mbedtls and output ${mbedtls}.
#------------------------------------------------------------------------------
AC_MSG_CHECKING([--with-mbedtls option])
AC_ARG_WITH([mbedtls],
AS_HELP_STRING([--with-mbedtls],
[Compile with MbedTLS. @<:@default=no@:>@]),
[with_mbedtls=$withval],
[with_mbedtls=no])
AC_MSG_RESULT([$with_mbedtls])
AS_CASE([${with_mbedtls}], [yes], AC_SUBST([mbedtls], [-DWITH_MBEDTLS]))

# Implement --enable-ndebug and define NDEBUG.
#------------------------------------------------------------------------------
AC_MSG_CHECKING([--enable-ndebug option])
Expand Down Expand Up @@ -260,22 +249,6 @@ AS_CASE([${enable_isystem}],[yes],

AC_MSG_NOTICE([bitcoin_protocol_BUILD_CPPFLAGS : ${bitcoin_protocol_BUILD_CPPFLAGS}])

# Require mbedtls of at least version 2.12.0 and output ${mbedtls_CPPFLAGS/LIBS/PKG}.
#------------------------------------------------------------------------------
AS_CASE([${with_mbedtls}], [yes],
[AC_SUBST([mbedtls_INCLUDEDIR], [])
AC_SUBST([mbedtls_OTHER_CPPFLAGS], [])
AC_SUBST([mbedtls_CPPFLAGS], [])
AC_SUBST([mbedtls_ISYS_CPPFLAGS], [])
AC_SUBST([mbedtls_LIBS], ["-lmbedtls -lmbedcrypto -lmbedx509"])
AC_MSG_NOTICE([mbedtls presumed, not detected - absence of -lmbedtls -lmbedcrypto -lmbedx509 may result in link error.])], [])

AS_CASE([${enable_isystem}],[yes],
[AC_SUBST([mbedtls_BUILD_CPPFLAGS], [${mbedtls_ISYS_CPPFLAGS}])],
[AC_SUBST([mbedtls_BUILD_CPPFLAGS], [${mbedtls_CPPFLAGS}])])

AC_MSG_NOTICE([mbedtls_BUILD_CPPFLAGS : ${mbedtls_BUILD_CPPFLAGS}])


# Set flags.
#==============================================================================
Expand Down
2 changes: 1 addition & 1 deletion console/executor.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2011-2017 libbitcoin developers (see AUTHORS)
* Copyright (c) 2011-2018 libbitcoin developers (see AUTHORS)
*
* This file is part of libbitcoin.
*
Expand Down
2 changes: 1 addition & 1 deletion console/executor.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2011-2017 libbitcoin developers (see AUTHORS)
* Copyright (c) 2011-2018 libbitcoin developers (see AUTHORS)
*
* This file is part of libbitcoin.
*
Expand Down
2 changes: 1 addition & 1 deletion console/main.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2011-2017 libbitcoin developers (see AUTHORS)
* Copyright (c) 2011-2018 libbitcoin developers (see AUTHORS)
*
* This file is part of libbitcoin.
*
Expand Down
2 changes: 1 addition & 1 deletion include/bitcoin/server/configuration.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2011-2017 libbitcoin developers (see AUTHORS)
* Copyright (c) 2011-2018 libbitcoin developers (see AUTHORS)
*
* This file is part of libbitcoin.
*
Expand Down
2 changes: 1 addition & 1 deletion include/bitcoin/server/define.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2011-2017 libbitcoin developers (see AUTHORS)
* Copyright (c) 2011-2018 libbitcoin developers (see AUTHORS)
*
* This file is part of libbitcoin.
*
Expand Down
2 changes: 1 addition & 1 deletion include/bitcoin/server/interface/blockchain.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2011-2017 libbitcoin developers (see AUTHORS)
* Copyright (c) 2011-2018 libbitcoin developers (see AUTHORS)
*
* This file is part of libbitcoin.
*
Expand Down
2 changes: 1 addition & 1 deletion include/bitcoin/server/interface/subscribe.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2011-2017 libbitcoin developers (see AUTHORS)
* Copyright (c) 2011-2018 libbitcoin developers (see AUTHORS)
*
* This file is part of libbitcoin.
*
Expand Down
2 changes: 1 addition & 1 deletion include/bitcoin/server/interface/transaction_pool.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2011-2017 libbitcoin developers (see AUTHORS)
* Copyright (c) 2011-2018 libbitcoin developers (see AUTHORS)
*
* This file is part of libbitcoin.
*
Expand Down
2 changes: 1 addition & 1 deletion include/bitcoin/server/interface/unsubscribe.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2011-2017 libbitcoin developers (see AUTHORS)
* Copyright (c) 2011-2018 libbitcoin developers (see AUTHORS)
*
* This file is part of libbitcoin.
*
Expand Down
2 changes: 1 addition & 1 deletion include/bitcoin/server/messages/message.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2011-2017 libbitcoin developers (see AUTHORS)
* Copyright (c) 2011-2018 libbitcoin developers (see AUTHORS)
*
* This file is part of libbitcoin.
*
Expand Down
2 changes: 1 addition & 1 deletion include/bitcoin/server/messages/route.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2011-2017 libbitcoin developers (see AUTHORS)
* Copyright (c) 2011-2018 libbitcoin developers (see AUTHORS)
*
* This file is part of libbitcoin.
*
Expand Down
2 changes: 1 addition & 1 deletion include/bitcoin/server/messages/subscription.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2011-2017 libbitcoin developers (see AUTHORS)
* Copyright (c) 2011-2018 libbitcoin developers (see AUTHORS)
*
* This file is part of libbitcoin.
*
Expand Down
2 changes: 1 addition & 1 deletion include/bitcoin/server/parser.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2011-2017 libbitcoin developers (see AUTHORS)
* Copyright (c) 2011-2018 libbitcoin developers (see AUTHORS)
*
* This file is part of libbitcoin.
*
Expand Down
2 changes: 1 addition & 1 deletion include/bitcoin/server/server_node.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2011-2017 libbitcoin developers (see AUTHORS)
* Copyright (c) 2011-2018 libbitcoin developers (see AUTHORS)
*
* This file is part of libbitcoin.
*
Expand Down
2 changes: 1 addition & 1 deletion include/bitcoin/server/services/block_service.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2011-2017 libbitcoin developers (see AUTHORS)
* Copyright (c) 2011-2018 libbitcoin developers (see AUTHORS)
*
* This file is part of libbitcoin.
*
Expand Down
2 changes: 1 addition & 1 deletion include/bitcoin/server/services/heartbeat_service.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2011-2017 libbitcoin developers (see AUTHORS)
* Copyright (c) 2011-2018 libbitcoin developers (see AUTHORS)
*
* This file is part of libbitcoin.
*
Expand Down
2 changes: 1 addition & 1 deletion include/bitcoin/server/services/query_service.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2011-2017 libbitcoin developers (see AUTHORS)
* Copyright (c) 2011-2018 libbitcoin developers (see AUTHORS)
*
* This file is part of libbitcoin.
*
Expand Down
2 changes: 1 addition & 1 deletion include/bitcoin/server/services/transaction_service.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2011-2017 libbitcoin developers (see AUTHORS)
* Copyright (c) 2011-2018 libbitcoin developers (see AUTHORS)
*
* This file is part of libbitcoin.
*
Expand Down
2 changes: 1 addition & 1 deletion include/bitcoin/server/settings.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2011-2017 libbitcoin developers (see AUTHORS)
* Copyright (c) 2011-2018 libbitcoin developers (see AUTHORS)
*
* This file is part of libbitcoin.
*
Expand Down
2 changes: 1 addition & 1 deletion include/bitcoin/server/workers/authenticator.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2011-2017 libbitcoin developers (see AUTHORS)
* Copyright (c) 2011-2018 libbitcoin developers (see AUTHORS)
*
* This file is part of libbitcoin.
*
Expand Down
2 changes: 1 addition & 1 deletion include/bitcoin/server/workers/notification_worker.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2011-2017 libbitcoin developers (see AUTHORS)
* Copyright (c) 2011-2018 libbitcoin developers (see AUTHORS)
*
* This file is part of libbitcoin.
*
Expand Down
2 changes: 1 addition & 1 deletion include/bitcoin/server/workers/query_worker.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2011-2017 libbitcoin developers (see AUTHORS)
* Copyright (c) 2011-2018 libbitcoin developers (see AUTHORS)
*
* This file is part of libbitcoin.
*
Expand Down
Loading