diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000..12994b8846 --- /dev/null +++ b/.gitignore @@ -0,0 +1,17 @@ +# .gitignore + +# Ignore vim swap files. +*.swp + +# Ignore SCons support files. +.sconsign.dblite + +# Ignore python compiled files. +*.pyc + +# Ignore object files. +*.o +obj/* + +newcoind + diff --git a/Makefile b/Makefile deleted file mode 100644 index dd05707875..0000000000 --- a/Makefile +++ /dev/null @@ -1,119 +0,0 @@ -# Copyright (c) 2009-2010 Satoshi Nakamoto -# Distributed under the MIT/X11 software license, see the accompanying -# file license.txt or http://www.opensource.org/licenses/mit-license.php. - -CXX=g++ -I/packages/openssl-1.0.0/include -Wall -Wno-sign-compare -Wno-char-subscripts - -DEFS= - -LIBS= \ - -pthread \ - -Wl,-Bstatic \ - -l boost_system-mt \ - -l boost_filesystem-mt \ - -l boost_program_options-mt \ - -l boost_thread-mt \ - -l protobuf \ - /packages/openssl-1.0.0/libssl.a /packages/openssl-1.0.0/libcrypto.a - -ifdef USE_UPNP - LIBS += -l miniupnpc DEFS += -DUSE_UPNP=$(USE_UPNP) -endif - -LIBS+= \ - -Wl,-Bdynamic \ - -l z \ - -l dl - -DEBUGFLAGS=-g -DDEBUG -CXXFLAGS=-O0 -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(DEFS) -HEADERS = \ - Application.h \ - base58.h \ - bignum.h \ - BitcoinUtil.h \ - CallRPC.h \ - Config.h \ - ConnectionPool.h \ - Conversion.h \ - HttpReply.h \ - HttpRequest.h \ - key.h \ - keystore.h \ - KnownNodeList.h \ - Ledger.h \ - LedgerHistory.h \ - LedgerMaster.h \ - NetworkThread.h \ - NewcoinAddress.h \ - PackedMessage.h \ - PeerDoor.h \ - Peer.h \ - RequestParser.h \ - RPCCommands.h \ - RPCDoor.h \ - RPC.h \ - RPCServer.h \ - script.h \ - SecureAllocator.h \ - TimingService.h \ - TransactionBundle.h \ - Transaction.h \ - types.h \ - uint256.h \ - UniqueNodeList.h \ - ValidationCollection.h \ - Wallet.h - -SRCS= keystore.cpp BitcoinUtil.cpp \ - main.cpp Hanko.cpp Transaction.cpp SHAMap.cpp SHAMapNodes.cpp Serializer.cpp Ledger.cpp \ - AccountState.cpp Wallet.cpp NewcoinAddress.cpp Config.cpp PackedMessage.cpp SHAMapSync.cpp \ - Application.cpp TimingService.cpp KnownNodeList.cpp ConnectionPool.cpp Peer.cpp LedgerAcquire.cpp \ - PeerDoor.cpp RPCDoor.cpp RPCServer.cpp rpc.cpp Conversion.cpp RequestParser.cpp HashedObject.cpp \ - UniqueNodeList.cpp PubKeyCache.cpp SHAMapDiff.cpp DeterministicKeys.cpp LedgerMaster.cpp \ - LedgerHistory.cpp NetworkOPs.cpp CallRPC.cpp DBInit.cpp LocalTransaction.cpp TransactionMaster.cpp - -DBSRCS= SqliteDatabase.cpp database.cpp -DBSRCC= sqlite3.c - -UTILSRCS= pugixml.cpp - -JSONSRCS= json_reader.cpp json_value.cpp json_writer.cpp - -# Application.cpp HttpReply.cpp main.cpp RPCCommands.cpp \ -# BitcoinUtil.cpp keystore.cpp NewcoinAddress.cpp rpc.cpp UniqueNodeList.cpp \ -# CallRPC.cpp KnownNodeList.cpp PackedMessage.cpp RPCDoor.cpp ValidationCollection.cpp \ -# Config.cpp Ledger.cpp Peer.cpp RPCServer.cpp Wallet.cpp \ -#ConnectionPool.cpp LedgerHistory.cpp PeerDoor.cpp TimingService.cpp \ -# Conversion.cpp LedgerMaster.cpp RequestParser.cpp TransactionBundle.cpp util/pugixml.o \ -# database/SqliteDatabase.cpp database/database.cpp -# database/linux/mysqldatabase.cpp database/database.cpp database/SqliteDatabase.cpp - -OBJS= $(SRCS:%.cpp=%.o) $(DBSRCS:%.cpp=database/%.o) $(DBSRCC:%.c=database/%.o) -OBJS+= $(UTILSRCS:%.cpp=util/%.o) newcoin.pb.o -OBJS+= $(JSONSRCS:%.cpp=json/%.o) -#cryptopp/obj/sha.o cryptopp/obj/cpu.o - -all: newcoind - -newcoin.pb.h: newcoin.proto - protoc --cpp_out=. newcoin.proto - -%.o: %.cpp - $(CXX) -c $(CXXFLAGS) -o $@ $< - - -newcoind: $(OBJS) - $(CXX) $(CXXFLAGS) -o $@ $^ $(LIBS) - -.dep: newcoin.pb.h - $(CXX) -M $(SRCS) $(CXXFLAGS) > .dep - -clean: - -rm -f newcoind - -rm -f *.o database/*.o util/*.o - -rm -f headers.h.gch - -rm -f newcoin.pb.* - -rm -f .dep - -include .dep diff --git a/SConstruct b/SConstruct new file mode 100644 index 0000000000..8b11942f9c --- /dev/null +++ b/SConstruct @@ -0,0 +1,59 @@ +# +# Newcoin - SConstruct +# + +import glob + +# Put objects files in their own directory. +for dir in ['src', 'database', 'json', 'util']: + VariantDir('obj/'+dir, dir, duplicate=0) + +env = Environment( + tools = ['default', 'protoc'] + ) + +# Use openssl +env.ParseConfig('pkg-config --cflags --libs openssl') + +env.Append(LIBS = [ + 'boost_system-mt', + 'boost_filesystem-mt', + 'boost_program_options-mt', + 'boost_thread-mt', + 'protobuf', + 'dl', # dynamic linking + 'z' + ]) + +DEBUGFLAGS = ['-g', '-DDEBUG'] + +env.Append(LINKFLAGS = ['-rdynamic', '-pthread']) +env.Append(CCFLAGS = ['-pthread', '-Wall', '-Wno-sign-compare', '-Wno-char-subscripts']) +env.Append(CXXFLAGS = ['-O0', '-pthread', '-Wno-invalid-offsetof', '-Wformat']+DEBUGFLAGS) + +DB_SRCS = glob.glob('database/*.c') + glob.glob('database/*.cpp') +JSON_SRCS = glob.glob('json/*.cpp') +NEWCOIN_SRCS = glob.glob('src/*.cpp') +PROTO_SRCS = env.Protoc([], 'src/newcoin.proto', PROTOCOUTDIR='obj', PROTOCPYTHONOUTDIR=None) +UTIL_SRCS = glob.glob('util/*.cpp') + +env.Clean(PROTO_SRCS, 'site_scons/site_tools/protoc.pyc') + +# Remove unused source files. +UNUSED_SRCS = ['src/HttpReply.cpp', 'src/ValidationCollection.cpp'] + +for file in UNUSED_SRCS: + NEWCOIN_SRCS.remove(file) + +NEWCOIN_SRCS += DB_SRCS + JSON_SRCS + UTIL_SRCS + +# Derive the object files from the source files. +NEWCOIN_OBJS = [] + +for file in NEWCOIN_SRCS: + NEWCOIN_OBJS.append('obj/' + file) + +NEWCOIN_OBJS += PROTO_SRCS + +env.Program('newcoind', NEWCOIN_OBJS) + diff --git a/database/database.h b/database/database.h index 6db45f5a47..d06ac10c89 100644 --- a/database/database.h +++ b/database/database.h @@ -3,7 +3,7 @@ #include #include -#include "../types.h" +#include "../src/types.h" /* this maintains the connection to the database diff --git a/site_scons/site_tools/protoc.py b/site_scons/site_tools/protoc.py new file mode 100644 index 0000000000..e3458bcf2a --- /dev/null +++ b/site_scons/site_tools/protoc.py @@ -0,0 +1,88 @@ +#!python +""" +protoc.py: Protoc Builder for SCons + +This Builder invokes protoc to generate C++ and Python +from a .proto file. + +NOTE: Java is not currently supported. + +From: http://www.scons.org/wiki/ProtocBuilder +""" + +__author__ = "Scott Stafford" + +import SCons.Action +import SCons.Builder +import SCons.Defaults +import SCons.Node.FS +import SCons.Util + +from SCons.Script import File, Dir + +import os.path + +protocs = 'protoc' + +ProtocAction = SCons.Action.Action('$PROTOCCOM', '$PROTOCCOMSTR') +def ProtocEmitter(target, source, env): + dirOfCallingSConscript = Dir('.').srcnode() + env.Prepend(PROTOCPROTOPATH = dirOfCallingSConscript.path) + + source_with_corrected_path = [] + for src in source: + commonprefix = os.path.commonprefix([dirOfCallingSConscript.path, src.srcnode().path]) + if len(commonprefix)>0: + source_with_corrected_path.append( src.srcnode().path[len(commonprefix + os.sep):] ) + else: + source_with_corrected_path.append( src.srcnode().path ) + + source = source_with_corrected_path + + for src in source: + modulename = os.path.splitext(src)[0] + + if env['PROTOCOUTDIR']: + base = os.path.join(env['PROTOCOUTDIR'] , modulename) + target.extend( [ base + '.pb.cc', base + '.pb.h' ] ) + + if env['PROTOCPYTHONOUTDIR']: + base = os.path.join(env['PROTOCPYTHONOUTDIR'] , modulename) + target.append( base + '_pb2.py' ) + + try: + target.append(env['PROTOCFDSOUT']) + except KeyError: + pass + + # XXX KLUDGE: Force things to be right. + env['PROTOCOUTDIR'] = 'obj/src' + env['PROTOCPROTOPATH'] = ['src'] + + #~ print "PROTOC SOURCE:", [str(s) for s in source] + #~ print "PROTOC TARGET:", [str(s) for s in target] + + return target, source + +ProtocBuilder = SCons.Builder.Builder(action = ProtocAction, + emitter = ProtocEmitter, + srcsuffix = '$PROTOCSRCSUFFIX') + +def generate(env): + """Add Builders and construction variables for protoc to an Environment.""" + try: + bld = env['BUILDERS']['Protoc'] + except KeyError: + bld = ProtocBuilder + env['BUILDERS']['Protoc'] = bld + + env['PROTOC'] = env.Detect(protocs) or 'protoc' + env['PROTOCFLAGS'] = SCons.Util.CLVar('') + env['PROTOCPROTOPATH'] = SCons.Util.CLVar('') + env['PROTOCCOM'] = '$PROTOC ${["-I%s"%x for x in PROTOCPROTOPATH]} $PROTOCFLAGS --cpp_out=$PROTOCCPPOUTFLAGS$PROTOCOUTDIR ${PROTOCPYTHONOUTDIR and ("--python_out="+PROTOCPYTHONOUTDIR) or ""} ${PROTOCFDSOUT and ("-o"+PROTOCFDSOUT) or ""} ${SOURCES}' + env['PROTOCOUTDIR'] = '${SOURCE.dir}' + env['PROTOCPYTHONOUTDIR'] = "python" + env['PROTOCSRCSUFFIX'] = '.proto' + +def exists(env): + return env.Detect(protocs) diff --git a/AccountState.cpp b/src/AccountState.cpp similarity index 100% rename from AccountState.cpp rename to src/AccountState.cpp diff --git a/AccountState.h b/src/AccountState.h similarity index 97% rename from AccountState.h rename to src/AccountState.h index 7459f3b52a..c8075dd0b0 100644 --- a/AccountState.h +++ b/src/AccountState.h @@ -7,7 +7,7 @@ #include -#include "json/value.h" +#include "../json/value.h" #include "types.h" #include "uint256.h" diff --git a/Application.cpp b/src/Application.cpp similarity index 98% rename from Application.cpp rename to src/Application.cpp index 78dc6fb6cc..008ec922a9 100644 --- a/Application.cpp +++ b/src/Application.cpp @@ -3,7 +3,7 @@ //#include -#include "database/SqliteDatabase.h" +#include "../database/SqliteDatabase.h" #include "Application.h" #include "Config.h" @@ -104,4 +104,4 @@ Application::~Application() delete mWalletDB; delete mHashNodeDB; delete mNetNodeDB; -} \ No newline at end of file +} diff --git a/Application.h b/src/Application.h similarity index 98% rename from Application.h rename to src/Application.h index ee6431e374..ed2fc70f14 100644 --- a/Application.h +++ b/src/Application.h @@ -13,7 +13,7 @@ #include "Wallet.h" #include "Peer.h" #include "NetworkOPs.h" -#include "database/database.h" +#include "../database/database.h" #include diff --git a/Avalanche.h b/src/Avalanche.h similarity index 100% rename from Avalanche.h rename to src/Avalanche.h diff --git a/BinaryFormats.h b/src/BinaryFormats.h similarity index 100% rename from BinaryFormats.h rename to src/BinaryFormats.h diff --git a/BitcoinUtil.cpp b/src/BitcoinUtil.cpp similarity index 100% rename from BitcoinUtil.cpp rename to src/BitcoinUtil.cpp diff --git a/BitcoinUtil.h b/src/BitcoinUtil.h similarity index 100% rename from BitcoinUtil.h rename to src/BitcoinUtil.h diff --git a/CallRPC.cpp b/src/CallRPC.cpp similarity index 98% rename from CallRPC.cpp rename to src/CallRPC.cpp index 6094a5bfbb..11a3bc297d 100644 --- a/CallRPC.cpp +++ b/src/CallRPC.cpp @@ -11,8 +11,8 @@ #include #include -#include "json/value.h" -#include "json/reader.h" +#include "../json/value.h" +#include "../json/reader.h" #include "CallRPC.h" #include "RPC.h" diff --git a/CallRPC.h b/src/CallRPC.h similarity index 85% rename from CallRPC.h rename to src/CallRPC.h index 39cf76a6df..03b90511ba 100644 --- a/CallRPC.h +++ b/src/CallRPC.h @@ -1,7 +1,7 @@ #include -#include "json/value.h" +#include "../json/value.h" extern int commandLineRPC(int argc, char *argv[]); extern Json::Value callRPC(const std::string& strMethod, const Json::Value& params); diff --git a/Config.cpp b/src/Config.cpp similarity index 96% rename from Config.cpp rename to src/Config.cpp index 05edebda01..1a69b73d73 100644 --- a/Config.cpp +++ b/src/Config.cpp @@ -1,5 +1,5 @@ #include "Config.h" -#include "util/pugixml.hpp" +#include "../util/pugixml.hpp" #include diff --git a/Config.h b/src/Config.h similarity index 100% rename from Config.h rename to src/Config.h diff --git a/Confirmation.h b/src/Confirmation.h similarity index 96% rename from Confirmation.h rename to src/Confirmation.h index 665e7a3cd3..1695e60aa3 100644 --- a/Confirmation.h +++ b/src/Confirmation.h @@ -1,7 +1,7 @@ #ifndef __CONFIRMATION__ #define __CONFIRMATION__ -#include "newcoin.pb.h" +#include "../obj/src/newcoin.pb.h" #include "uint256.h" #include diff --git a/ConnectionPool.cpp b/src/ConnectionPool.cpp similarity index 100% rename from ConnectionPool.cpp rename to src/ConnectionPool.cpp diff --git a/ConnectionPool.h b/src/ConnectionPool.h similarity index 100% rename from ConnectionPool.h rename to src/ConnectionPool.h diff --git a/Conversion.cpp b/src/Conversion.cpp similarity index 100% rename from Conversion.cpp rename to src/Conversion.cpp diff --git a/Conversion.h b/src/Conversion.h similarity index 100% rename from Conversion.h rename to src/Conversion.h diff --git a/DBInit.cpp b/src/DBInit.cpp similarity index 100% rename from DBInit.cpp rename to src/DBInit.cpp diff --git a/DeterministicKeys.cpp b/src/DeterministicKeys.cpp similarity index 100% rename from DeterministicKeys.cpp rename to src/DeterministicKeys.cpp diff --git a/Hanko.cpp b/src/Hanko.cpp similarity index 100% rename from Hanko.cpp rename to src/Hanko.cpp diff --git a/Hanko.h b/src/Hanko.h similarity index 100% rename from Hanko.h rename to src/Hanko.h diff --git a/HashedObject.cpp b/src/HashedObject.cpp similarity index 100% rename from HashedObject.cpp rename to src/HashedObject.cpp diff --git a/HashedObject.h b/src/HashedObject.h similarity index 100% rename from HashedObject.h rename to src/HashedObject.h diff --git a/HttpReply.cpp b/src/HttpReply.cpp similarity index 100% rename from HttpReply.cpp rename to src/HttpReply.cpp diff --git a/HttpReply.h b/src/HttpReply.h similarity index 100% rename from HttpReply.h rename to src/HttpReply.h diff --git a/HttpRequest.h b/src/HttpRequest.h similarity index 100% rename from HttpRequest.h rename to src/HttpRequest.h diff --git a/KnownNodeList.cpp b/src/KnownNodeList.cpp similarity index 95% rename from KnownNodeList.cpp rename to src/KnownNodeList.cpp index b70d2e77c1..e170935bc4 100644 --- a/KnownNodeList.cpp +++ b/src/KnownNodeList.cpp @@ -1,5 +1,5 @@ #include "KnownNodeList.h" -#include "util/pugixml.hpp" +#include "../util/pugixml.hpp" using namespace pugi; @@ -35,4 +35,4 @@ KnownNode* KnownNodeList::getNextNode() mTriedIndex++; return(&(mNodes[mTriedIndex-1])); } -} \ No newline at end of file +} diff --git a/KnownNodeList.h b/src/KnownNodeList.h similarity index 100% rename from KnownNodeList.h rename to src/KnownNodeList.h diff --git a/Ledger.cpp b/src/Ledger.cpp similarity index 99% rename from Ledger.cpp rename to src/Ledger.cpp index 469053b6d1..0a41ef5c27 100644 --- a/Ledger.cpp +++ b/src/Ledger.cpp @@ -7,7 +7,7 @@ #include "Application.h" #include "Ledger.h" -#include "newcoin.pb.h" +#include "../obj/src/newcoin.pb.h" #include "PackedMessage.h" #include "Config.h" #include "Conversion.h" diff --git a/Ledger.h b/src/Ledger.h similarity index 99% rename from Ledger.h rename to src/Ledger.h index 23b408d595..b1869875b3 100644 --- a/Ledger.h +++ b/src/Ledger.h @@ -7,7 +7,7 @@ #include #include -#include "json/value.h" +#include "../json/value.h" #include "Transaction.h" #include "types.h" diff --git a/LedgerAcquire.cpp b/src/LedgerAcquire.cpp similarity index 100% rename from LedgerAcquire.cpp rename to src/LedgerAcquire.cpp diff --git a/LedgerAcquire.h b/src/LedgerAcquire.h similarity index 98% rename from LedgerAcquire.h rename to src/LedgerAcquire.h index c1b5866391..4508a2d83f 100644 --- a/LedgerAcquire.h +++ b/src/LedgerAcquire.h @@ -9,7 +9,7 @@ #include "Ledger.h" #include "Peer.h" -#include "newcoin.pb.h" +#include "../obj/src/newcoin.pb.h" class LedgerAcquire : public boost::enable_shared_from_this { // A ledger we are trying to acquire diff --git a/LedgerHistory.cpp b/src/LedgerHistory.cpp similarity index 100% rename from LedgerHistory.cpp rename to src/LedgerHistory.cpp diff --git a/LedgerHistory.h b/src/LedgerHistory.h similarity index 100% rename from LedgerHistory.h rename to src/LedgerHistory.h diff --git a/LedgerMaster.cpp b/src/LedgerMaster.cpp similarity index 100% rename from LedgerMaster.cpp rename to src/LedgerMaster.cpp diff --git a/LedgerMaster.h b/src/LedgerMaster.h similarity index 100% rename from LedgerMaster.h rename to src/LedgerMaster.h diff --git a/LocalAccount.h b/src/LocalAccount.h similarity index 100% rename from LocalAccount.h rename to src/LocalAccount.h diff --git a/LocalTransaction.cpp b/src/LocalTransaction.cpp similarity index 98% rename from LocalTransaction.cpp rename to src/LocalTransaction.cpp index 5a1196956a..beb1133cb9 100644 --- a/LocalTransaction.cpp +++ b/src/LocalTransaction.cpp @@ -1,7 +1,7 @@ #include -#include "json/writer.h" +#include "../json/writer.h" #include "LocalTransaction.h" #include "Application.h" diff --git a/LocalTransaction.h b/src/LocalTransaction.h similarity index 98% rename from LocalTransaction.h rename to src/LocalTransaction.h index 051d129293..2089aefa06 100644 --- a/LocalTransaction.h +++ b/src/LocalTransaction.h @@ -7,7 +7,7 @@ #include -#include "json/value.h" +#include "../json/value.h" #include "uint256.h" #include "Transaction.h" diff --git a/NetworkOPs.cpp b/src/NetworkOPs.cpp similarity index 100% rename from NetworkOPs.cpp rename to src/NetworkOPs.cpp diff --git a/NetworkOPs.h b/src/NetworkOPs.h similarity index 100% rename from NetworkOPs.h rename to src/NetworkOPs.h diff --git a/NetworkStatus.h b/src/NetworkStatus.h similarity index 100% rename from NetworkStatus.h rename to src/NetworkStatus.h diff --git a/NewcoinAddress.cpp b/src/NewcoinAddress.cpp similarity index 100% rename from NewcoinAddress.cpp rename to src/NewcoinAddress.cpp diff --git a/NewcoinAddress.h b/src/NewcoinAddress.h similarity index 100% rename from NewcoinAddress.h rename to src/NewcoinAddress.h diff --git a/PackedMessage.cpp b/src/PackedMessage.cpp similarity index 100% rename from PackedMessage.cpp rename to src/PackedMessage.cpp diff --git a/PackedMessage.h b/src/PackedMessage.h similarity index 98% rename from PackedMessage.h rename to src/PackedMessage.h index 0c1a134d11..16363d0c1c 100644 --- a/PackedMessage.h +++ b/src/PackedMessage.h @@ -14,7 +14,7 @@ #include #include -#include "newcoin.pb.h" +#include "../obj/src/newcoin.pb.h" // The header size for packed messages // len(4)+type(2) diff --git a/Peer.cpp b/src/Peer.cpp similarity index 99% rename from Peer.cpp rename to src/Peer.cpp index 8f48dd86b5..507a17d728 100644 --- a/Peer.cpp +++ b/src/Peer.cpp @@ -6,7 +6,7 @@ #include #include -#include "json/writer.h" +#include "../json/writer.h" #include "Peer.h" #include "KnownNodeList.h" diff --git a/Peer.h b/src/Peer.h similarity index 98% rename from Peer.h rename to src/Peer.h index 0ddda232be..ae1a0542c6 100644 --- a/Peer.h +++ b/src/Peer.h @@ -6,7 +6,7 @@ #include #include -#include "newcoin.pb.h" +#include "../obj/src/newcoin.pb.h" #include "PackedMessage.h" #include "Ledger.h" #include "Transaction.h" diff --git a/PeerDoor.cpp b/src/PeerDoor.cpp similarity index 100% rename from PeerDoor.cpp rename to src/PeerDoor.cpp diff --git a/PeerDoor.h b/src/PeerDoor.h similarity index 100% rename from PeerDoor.h rename to src/PeerDoor.h diff --git a/PubKeyCache.cpp b/src/PubKeyCache.cpp similarity index 100% rename from PubKeyCache.cpp rename to src/PubKeyCache.cpp diff --git a/PubKeyCache.h b/src/PubKeyCache.h similarity index 100% rename from PubKeyCache.h rename to src/PubKeyCache.h diff --git a/RPC.h b/src/RPC.h similarity index 97% rename from RPC.h rename to src/RPC.h index ccfdf9650c..f4f75f79f7 100644 --- a/RPC.h +++ b/src/RPC.h @@ -1,7 +1,7 @@ #include #include -#include "json/value.h" +#include "../json/value.h" enum http_status_type { diff --git a/RPCCommands.cpp b/src/RPCCommands.cpp similarity index 100% rename from RPCCommands.cpp rename to src/RPCCommands.cpp diff --git a/RPCCommands.h b/src/RPCCommands.h similarity index 100% rename from RPCCommands.h rename to src/RPCCommands.h diff --git a/RPCDoor.cpp b/src/RPCDoor.cpp similarity index 100% rename from RPCDoor.cpp rename to src/RPCDoor.cpp diff --git a/RPCDoor.h b/src/RPCDoor.h similarity index 100% rename from RPCDoor.h rename to src/RPCDoor.h diff --git a/RPCServer.cpp b/src/RPCServer.cpp similarity index 99% rename from RPCServer.cpp rename to src/RPCServer.cpp index abe10c7314..67017af4fe 100644 --- a/RPCServer.cpp +++ b/src/RPCServer.cpp @@ -5,9 +5,9 @@ #include #include -#include "json/value.h" -#include "json/reader.h" -#include "json/writer.h" +#include "../json/value.h" +#include "../json/reader.h" +#include "../json/writer.h" #include "RPCServer.h" #include "RequestParser.h" diff --git a/RPCServer.h b/src/RPCServer.h similarity index 98% rename from RPCServer.h rename to src/RPCServer.h index 7787b30a42..eb9bee52cf 100644 --- a/RPCServer.h +++ b/src/RPCServer.h @@ -3,7 +3,7 @@ #include #include -#include "json/value.h" +#include "../json/value.h" #include "HttpRequest.h" #include "RequestParser.h" diff --git a/RequestParser.cpp b/src/RequestParser.cpp similarity index 100% rename from RequestParser.cpp rename to src/RequestParser.cpp diff --git a/RequestParser.h b/src/RequestParser.h similarity index 100% rename from RequestParser.h rename to src/RequestParser.h diff --git a/SHAMap.cpp b/src/SHAMap.cpp similarity index 100% rename from SHAMap.cpp rename to src/SHAMap.cpp diff --git a/SHAMap.h b/src/SHAMap.h similarity index 100% rename from SHAMap.h rename to src/SHAMap.h diff --git a/SHAMapDiff.cpp b/src/SHAMapDiff.cpp similarity index 100% rename from SHAMapDiff.cpp rename to src/SHAMapDiff.cpp diff --git a/SHAMapNodes.cpp b/src/SHAMapNodes.cpp similarity index 100% rename from SHAMapNodes.cpp rename to src/SHAMapNodes.cpp diff --git a/SHAMapSync.cpp b/src/SHAMapSync.cpp similarity index 100% rename from SHAMapSync.cpp rename to src/SHAMapSync.cpp diff --git a/ScopedLock.h b/src/ScopedLock.h similarity index 100% rename from ScopedLock.h rename to src/ScopedLock.h diff --git a/SecureAllocator.h b/src/SecureAllocator.h similarity index 100% rename from SecureAllocator.h rename to src/SecureAllocator.h diff --git a/Serializer.cpp b/src/Serializer.cpp similarity index 100% rename from Serializer.cpp rename to src/Serializer.cpp diff --git a/Serializer.h b/src/Serializer.h similarity index 100% rename from Serializer.h rename to src/Serializer.h diff --git a/TaggedCache.h b/src/TaggedCache.h similarity index 100% rename from TaggedCache.h rename to src/TaggedCache.h diff --git a/TimingService.cpp b/src/TimingService.cpp similarity index 100% rename from TimingService.cpp rename to src/TimingService.cpp diff --git a/TimingService.h b/src/TimingService.h similarity index 100% rename from TimingService.h rename to src/TimingService.h diff --git a/Transaction.cpp b/src/Transaction.cpp similarity index 100% rename from Transaction.cpp rename to src/Transaction.cpp diff --git a/Transaction.h b/src/Transaction.h similarity index 98% rename from Transaction.h rename to src/Transaction.h index 04a72b2be9..1f0501b508 100644 --- a/Transaction.h +++ b/src/Transaction.h @@ -7,11 +7,11 @@ #include #include -#include "json/value.h" +#include "../json/value.h" #include "key.h" #include "uint256.h" -#include "newcoin.pb.h" +#include "../obj/src/newcoin.pb.h" #include "Hanko.h" #include "Serializer.h" #include "SHAMap.h" diff --git a/TransactionMaster.cpp b/src/TransactionMaster.cpp similarity index 100% rename from TransactionMaster.cpp rename to src/TransactionMaster.cpp diff --git a/TransactionMaster.h b/src/TransactionMaster.h similarity index 100% rename from TransactionMaster.h rename to src/TransactionMaster.h diff --git a/UniqueNodeList.cpp b/src/UniqueNodeList.cpp similarity index 100% rename from UniqueNodeList.cpp rename to src/UniqueNodeList.cpp diff --git a/UniqueNodeList.h b/src/UniqueNodeList.h similarity index 91% rename from UniqueNodeList.h rename to src/UniqueNodeList.h index dc7d311f02..9727cb7c98 100644 --- a/UniqueNodeList.h +++ b/src/UniqueNodeList.h @@ -1,6 +1,6 @@ #ifndef __UNIQUE_NODE_LIST__ #define __UNIQUE_NODE_LIST__ -#include "newcoin.pb.h" +#include "../obj/src/newcoin.pb.h" #include "uint256.h" class UniqueNodeList @@ -22,4 +22,4 @@ public: }; -#endif \ No newline at end of file +#endif diff --git a/ValidationCollection.cpp b/src/ValidationCollection.cpp similarity index 100% rename from ValidationCollection.cpp rename to src/ValidationCollection.cpp diff --git a/ValidationCollection.h b/src/ValidationCollection.h similarity index 97% rename from ValidationCollection.h rename to src/ValidationCollection.h index db3c06fdd3..eb25be859e 100644 --- a/ValidationCollection.h +++ b/src/ValidationCollection.h @@ -1,7 +1,7 @@ #ifndef __VALIDATION_COLLECTION__ #define __VALIDATION_COLLECTION__ -#include "newcoin.pb.h" +#include "../obj/src/newcoin.pb.h" #include "uint256.h" #include "types.h" #include "Ledger.h" @@ -53,4 +53,4 @@ public: int getSeqNum(uint32 ledgerIndex); }; -#endif \ No newline at end of file +#endif diff --git a/Wallet.cpp b/src/Wallet.cpp similarity index 100% rename from Wallet.cpp rename to src/Wallet.cpp diff --git a/Wallet.h b/src/Wallet.h similarity index 99% rename from Wallet.h rename to src/Wallet.h index 0e8d22b666..112a88a2cd 100644 --- a/Wallet.h +++ b/src/Wallet.h @@ -10,7 +10,7 @@ #include "openssl/ec.h" -#include "json/value.h" +#include "../json/value.h" #include "uint256.h" #include "Serializer.h" diff --git a/base58.h b/src/base58.h similarity index 100% rename from base58.h rename to src/base58.h diff --git a/bignum.h b/src/bignum.h similarity index 100% rename from bignum.h rename to src/bignum.h diff --git a/key.h b/src/key.h similarity index 100% rename from key.h rename to src/key.h diff --git a/keystore.cpp b/src/keystore.cpp similarity index 100% rename from keystore.cpp rename to src/keystore.cpp diff --git a/keystore.h b/src/keystore.h similarity index 100% rename from keystore.h rename to src/keystore.h diff --git a/main.cpp b/src/main.cpp similarity index 100% rename from main.cpp rename to src/main.cpp diff --git a/newcoin.proto b/src/newcoin.proto similarity index 100% rename from newcoin.proto rename to src/newcoin.proto diff --git a/rpc.cpp b/src/rpc.cpp similarity index 99% rename from rpc.cpp rename to src/rpc.cpp index c06997cee6..e15d955f0e 100644 --- a/rpc.cpp +++ b/src/rpc.cpp @@ -8,8 +8,8 @@ #include #include -#include "json/value.h" -#include "json/writer.h" +#include "../json/value.h" +#include "../json/writer.h" #include "RPC.h" #include "BitcoinUtil.h" diff --git a/script.h b/src/script.h similarity index 100% rename from script.h rename to src/script.h diff --git a/types.h b/src/types.h similarity index 100% rename from types.h rename to src/types.h diff --git a/uint256.h b/src/uint256.h similarity index 100% rename from uint256.h rename to src/uint256.h