Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1584 simplifications #120

Merged
merged 11 commits into from
Apr 23, 2019
Merged
Show file tree
Hide file tree
Changes from 10 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
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ script:
- set -o pipefail
- tests/run-parallel-tests.sh tests/all_tests
- "tests/api 2>&1 | grep -vE 'callback result 9|remote_calc->add. 4, 5 .: 9|set callback|] \\.$'"
- tests/bip_lock 2>&1 | cat
- tests/hmac_test 2>&1 | cat
- tests/ecc_test README.md 2>&1 | cat
- tests/log_test 2>&1 | cat
Expand Down
25 changes: 3 additions & 22 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ SET( DEFAULT_LIBRARY_INSTALL_DIR lib/ )
SET( DEFAULT_EXECUTABLE_INSTALL_DIR bin/ )
SET( CMAKE_DEBUG_POSTFIX _debug )
SET( BUILD_SHARED_LIBS NO )
SET( ECC_IMPL secp256k1 CACHE STRING "secp256k1 or openssl or mixed" )

set(platformBitness 32)
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
Expand All @@ -37,17 +36,6 @@ SET(BOOST_COMPONENTS)
LIST(APPEND BOOST_COMPONENTS thread date_time filesystem system program_options chrono unit_test_framework context iostreams regex)
SET( Boost_USE_STATIC_LIBS ON CACHE STRING "ON or OFF" )

IF( ECC_IMPL STREQUAL openssl )
SET( ECC_REST src/crypto/elliptic_impl_pub.cpp )
ELSE( ECC_IMPL STREQUAL openssl )
SET( ECC_LIB secp256k1 )
IF( ECC_IMPL STREQUAL mixed )
SET( ECC_REST src/crypto/elliptic_impl_priv.cpp src/crypto/elliptic_impl_pub.cpp )
ELSE( ECC_IMPL STREQUAL mixed )
SET( ECC_REST src/crypto/elliptic_impl_priv.cpp )
ENDIF( ECC_IMPL STREQUAL mixed )
ENDIF( ECC_IMPL STREQUAL openssl )

# Configure secp256k1-zkp
if ( MSVC )
# autoconf won't work here, hard code the defines
Expand Down Expand Up @@ -233,17 +221,12 @@ set( fc_sources
src/io/sstream.cpp
src/io/json.cpp
src/io/varint.cpp
src/io/console.cpp
src/filesystem.cpp
src/interprocess/signals.cpp
src/interprocess/file_mapping.cpp
src/interprocess/mmap_struct.cpp
src/interprocess/file_mutex.cpp
src/rpc/cli.cpp
src/rpc/http_api.cpp
src/rpc/json_connection.cpp
src/rpc/state.cpp
src/rpc/bstate.cpp
src/rpc/websocket_api.cpp
src/log/log_message.cpp
src/log/logger.cpp
Expand All @@ -257,7 +240,6 @@ set( fc_sources
src/crypto/aes.cpp
src/crypto/crc.cpp
src/crypto/city.cpp
src/crypto/base36.cpp
src/crypto/base58.cpp
src/crypto/base64.cpp
src/crypto/bigint.cpp
Expand All @@ -268,10 +250,9 @@ set( fc_sources
src/crypto/sha224.cpp
src/crypto/sha512.cpp
src/crypto/dh.cpp
src/crypto/blowfish.cpp
src/crypto/elliptic_common.cpp
${ECC_REST}
src/crypto/elliptic_${ECC_IMPL}.cpp
src/crypto/elliptic_impl_priv.cpp
src/crypto/elliptic_secp256k1.cpp
src/crypto/rand.cpp
src/network/tcp_socket.cpp
src/network/udp_socket.cpp
Expand Down Expand Up @@ -401,7 +382,7 @@ target_include_directories(fc
IF(NOT WIN32)
set(LINK_USR_LOCAL_LIB -L/usr/local/lib)
ENDIF()
target_link_libraries( fc PUBLIC ${LINK_USR_LOCAL_LIB} ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} ${ZLIB_LIBRARIES} ${PLATFORM_SPECIFIC_LIBS} ${RPCRT4} ${CMAKE_DL_LIBS} ${rt_library} ${editline_libraries} ${ECC_LIB} )
target_link_libraries( fc PUBLIC ${LINK_USR_LOCAL_LIB} ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} ${ZLIB_LIBRARIES} ${PLATFORM_SPECIFIC_LIBS} ${RPCRT4} ${CMAKE_DL_LIBS} ${rt_library} ${editline_libraries} secp256k1 )

if(MSVC)
set_source_files_properties( src/network/http/websocket.cpp PROPERTIES COMPILE_FLAGS "/bigobj" )
Expand Down
8 changes: 1 addition & 7 deletions fc.natvis
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,6 @@
</Expand>
</Type>

<Type Name="fc::string">
<DisplayString>{my}</DisplayString>
<Expand>
<ExpandedItem>my</ExpandedItem>
</Expand>
</Type>

<Type Name="fc::optional&lt;*&gt;">
<DisplayString Condition="!_valid">invalid</DisplayString>
Expand All @@ -54,4 +48,4 @@
</Expand>
</Type>

</AutoVisualizer>
</AutoVisualizer>
65 changes: 0 additions & 65 deletions include/fc/actor.hpp

This file was deleted.

14 changes: 0 additions & 14 deletions include/fc/aligned.hpp

This file was deleted.

7 changes: 0 additions & 7 deletions include/fc/any.hpp

This file was deleted.

6 changes: 3 additions & 3 deletions include/fc/api.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once
#include <fc/thread/future.hpp>
#include <fc/any.hpp>
#include <functional>
#include <boost/any.hpp>
#include <boost/config.hpp>

// ms visual c++ (as of 2013) doesn't accept the standard syntax for calling a
Expand Down Expand Up @@ -75,7 +75,7 @@ namespace fc {
api( const T& p )
:_vtable( std::make_shared<vtable_type>() )
{
_data = std::make_shared<fc::any>(p);
_data = std::make_shared<boost::any>(p);
T& ptr = boost::any_cast<T&>(*_data);
auto& pointed_at = *ptr;
typedef typename std::remove_reference<decltype(pointed_at)>::type source_vtable_type;
Expand All @@ -95,7 +95,7 @@ namespace fc {

protected:
std::shared_ptr<vtable_type> _vtable;
std::shared_ptr<fc::any> _data;
std::shared_ptr<boost::any> _data;
};

} // namespace fc
Expand Down
2 changes: 1 addition & 1 deletion include/fc/array.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ namespace fc {
std::vector<char> ve = v.as< std::vector<char> >( 1 );
if( ve.size() )
{
memcpy(&bi, ve.data(), fc::min<size_t>(ve.size(),sizeof(bi)) );
memcpy(&bi, ve.data(), std::min<size_t>(ve.size(),sizeof(bi)) );
}
else
memset( &bi, char(0), sizeof(bi) );
Expand Down
4 changes: 2 additions & 2 deletions include/fc/asio.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ namespace asio {
{
public:
istream( std::shared_ptr<AsyncReadStream> str )
:_stream( fc::move(str) ){}
:_stream( std::move(str) ){}

virtual size_t readsome( char* buf, size_t len )
{
Expand All @@ -302,7 +302,7 @@ namespace asio {
{
public:
ostream( std::shared_ptr<AsyncWriteStream> str )
:_stream( fc::move(str) ){}
:_stream( std::move(str) ){}

virtual size_t writesome( const char* buf, size_t len )
{
Expand Down
4 changes: 2 additions & 2 deletions include/fc/compress/zlib.hpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#pragma once

#include <fc/string.hpp>
#include <string>

namespace fc
{

string zlib_compress(const string& in);
std::string zlib_compress(const std::string& in);

} // namespace fc
14 changes: 0 additions & 14 deletions include/fc/container/deque_fwd.hpp

This file was deleted.

10 changes: 0 additions & 10 deletions include/fc/crypto/base36.hpp

This file was deleted.

2 changes: 1 addition & 1 deletion include/fc/crypto/base58.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#pragma once
#include <fc/string.hpp>
#include <string>
#include <vector>

namespace fc {
Expand Down
6 changes: 3 additions & 3 deletions include/fc/crypto/bigint.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once
#include <stdint.h>
#include <fc/string.hpp>
#include <fc/vector.hpp>
#include <string>
#include <vector>

struct bignum_st;
typedef bignum_st BIGNUM;
Expand Down Expand Up @@ -55,7 +55,7 @@ namespace fc {
bigint operator--(int);
bigint& operator--();

operator fc::string()const;
operator std::string()const;

// returns bignum as bigendian bytes
operator std::vector<char>()const;
Expand Down
Loading