Skip to content

Commit

Permalink
Restructure proposer, isolate components
Browse files Browse the repository at this point in the history
  • Loading branch information
scravy committed Oct 21, 2018
1 parent 5d5b2bf commit 9072357
Show file tree
Hide file tree
Showing 42 changed files with 1,395 additions and 353 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,6 @@ contrib/devtools/split-debug.sh
confdefs.h
conftest.c
conftest.err
conftest.cpp
conftest
conftest.nm
32 changes: 23 additions & 9 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -99,18 +99,18 @@ UNITE_CORE_H = \
core_io.h \
core_memusage.h \
cuckoocache.h \
dependency.h \
dependency_injector.h \
esperanza/admincommand.h \
esperanza/adminparams.h \
esperanza/adminstate.h \
esperanza/checkpoint.h \
esperanza/finalizationparams.h \
esperanza/finalizationstate.h \
esperanza/init.h \
esperanza/kernel.h \
esperanza/params.h \
esperanza/settings.h \
esperanza/settings_init.h \
esperanza/stakevalidation.h \
esperanza/validation.h \
esperanza/validator.h \
esperanza/validatorstate.h \
Expand All @@ -121,6 +121,7 @@ UNITE_CORE_H = \
httpserver.h \
indirectmap.h \
init.h \
injector.h \
key.h \
key/mnemonic/mnemonic.h \
key/mnemonic/chinese_simplified.h \
Expand Down Expand Up @@ -148,9 +149,18 @@ UNITE_CORE_H = \
policy/policy.h \
policy/rbf.h \
pow.h \
proposer/blockproposer.h \
proposer/chainstate.h \
proposer/multiwallet.h \
proposer/network.h \
proposer/proposer.h \
proposer/proposer_init.h \
proposer/proposer_settings.h \
proposer/proposer_state.h \
proposer/proposer_status.h \
proposer/sync.h \
proposer/transactionpicker.h \
proposer/waiter.h \
protocol.h \
random.h \
reverse_iterator.h \
Expand Down Expand Up @@ -178,6 +188,9 @@ UNITE_CORE_H = \
snapshot/messages.h \
snapshot/p2p_processing.h \
snapshot/state.h \
staking/kernel.h \
staking/stakingwallet.h \
staking/stakevalidation.h \
streams.h \
support/allocators/secure.h \
support/allocators/zeroafterfree.h \
Expand Down Expand Up @@ -205,7 +218,6 @@ UNITE_CORE_H = \
validation.h \
validationinterface.h \
versionbits.h \
waiter.h \
wallet/coincontrol.h \
wallet/crypter.h \
wallet/db.h \
Expand All @@ -227,7 +239,6 @@ UNITE_CORE_H = \
zmq/zmqnotificationinterface.h \
zmq/zmqpublishnotifier.h


obj/build.h: FORCE
@$(MKDIR_P) $(builddir)/obj
@$(top_srcdir)/share/genbuild.sh "$(abs_top_builddir)/src/obj/build.h" \
Expand Down Expand Up @@ -303,22 +314,27 @@ libunite_zmq_a_SOURCES = \
zmq/zmqpublishnotifier.cpp
endif


# wallet: shared between united and unite-qt, but only linked
# when wallet enabled
libunite_wallet_a_CPPFLAGS = $(AM_CPPFLAGS) $(UNITE_INCLUDES)
libunite_wallet_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
libunite_wallet_a_SOURCES = \
address/address.cpp \
esperanza/init.cpp \
esperanza/kernel.cpp \
esperanza/stakevalidation.cpp \
esperanza/walletextension.cpp \
key/mnemonic/mnemonic.cpp \
proposer/blockproposer.cpp \
proposer/chainstate.cpp \
proposer/multiwallet.cpp \
proposer/network.cpp \
proposer/proposer.cpp \
proposer/proposer_init.cpp \
proposer/transactionpicker.cpp \
proposer/sync.cpp \
proposer/waiter.cpp \
rpc/proposer.cpp \
staking/kernel.cpp \
staking/stakevalidation.cpp \
unilib/uninorms.cpp \
unilib/utf8.cpp \
wallet/crypter.cpp \
Expand Down Expand Up @@ -451,7 +467,6 @@ libunite_util_a_SOURCES = \
utilmoneystr.cpp \
utilstrencodings.cpp \
utiltime.cpp \
waiter.cpp \
$(UNITE_CORE_H)

if GLIBC_BACK_COMPAT
Expand All @@ -477,7 +492,6 @@ united_LDADD = \
$(LIBUNIVALUE) \
$(LIBUNITE_UTIL) \
$(LIBUNITE_WALLET) \
$(LIBUNITE_UTIL) \
$(LIBUNITE_ZMQ) \
$(LIBUNITE_CONSENSUS) \
$(LIBUNITE_CRYPTO) \
Expand Down
9 changes: 5 additions & 4 deletions src/Makefile.test.include
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ RAW_TEST_FILES =
GENERATED_TEST_FILES = $(JSON_TEST_FILES:.json=.json.h) $(RAW_TEST_FILES:.raw=.raw.h)

# test_unite binary #
UNITE_TESTS =\
UNITE_TESTS = \
test/fakeit/fakeit.hpp \
test/arith_uint256_tests.cpp \
test/scriptnum10.h \
Expand All @@ -44,9 +44,9 @@ UNITE_TESTS =\
test/checkqueue_tests.cpp \
test/coins_tests.cpp \
test/compress_tests.cpp \
test/counting_semaphore_tests.cpp \
test/crypto_tests.cpp \
test/cuckoocache_tests.cpp \
test/dependency_injector_tests.cpp \
test/DoS_tests.cpp \
test/esperanza/admincommand_tests.cpp \
test/esperanza/adminstate_tests.cpp \
Expand Down Expand Up @@ -110,14 +110,15 @@ UNITE_TESTS =\
test/util_tests.cpp \
test/util_fun_tests.cpp \
test/validation_block_tests.cpp \
test/versionbits_tests.cpp \
test/waiter_tests.cpp
test/versionbits_tests.cpp

if ENABLE_WALLET
UNITE_TESTS += \
test/counting_semaphore_tests.cpp \
test/mnemonic_tests.cpp \
test/proposer/blockassembleradapter_tests.cpp \
test/proposer/proposer_tests.cpp \
test/waiter_tests.cpp \
wallet/test/rpcvalidator_tests.cpp \
wallet/test/wallet_test_fixture.cpp \
wallet/test/wallet_test_fixture.h \
Expand Down
12 changes: 12 additions & 0 deletions src/dependency.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Copyright (c) 2018 The unit-e core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.


#ifndef UNIT_E_DEPENDENCY_H
#define UNIT_E_DEPENDENCY_H

template<typename T>
using Dependency = T*;

#endif //UNIT_E_DEPENDENCY_H
Loading

0 comments on commit 9072357

Please # to comment.