Merge branch 'feature-cleanup' of github.com:vinniefalco/NewCoin into develop

This commit is contained in:
JoelKatz
2013-06-20 13:47:31 -07:00
260 changed files with 2090 additions and 3134 deletions

1
.gitignore vendored
View File

@@ -30,6 +30,7 @@ node_modules
tmp
# Ignore database directory.
db
db/*.db
db/*.db-*

View File

@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros">
<RepoDir>..\..</RepoDir>
<SrcDir>$(RepoDir)\src\cpp\ripple</SrcDir>
</PropertyGroup>
<PropertyGroup>
<OutDir>$(RepoDir)\build\VisualStudio2010\$(Configuration).$(Platform)\</OutDir>
</PropertyGroup>
<PropertyGroup>
<IntDir>$(RepoDir)\build\obj\VisualStudio2010\$(Configuration).$(Platform)\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>$(RepoDir);$(RepoDir)\src\cpp\leveldb;$(RepoDir)\src\cpp\leveldb\include;$(RepoDir)\src\cpp\protobuf\src;$(RepoDir)\src\cpp\protobuf\vsprojects;$(RepoDir)\build\proto;$(RepoDir)\Subtrees\beast;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>USE_LEVELDB;BOOST_TEST_ALTERNATIVE_INIT_API;BOOST_TEST_NO_MAIN;_WIN32_WINNT=0x0600;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WarningLevel>Level3</WarningLevel>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
<BuildMacro Include="RepoDir">
<Value>$(RepoDir)</Value>
</BuildMacro>
<BuildMacro Include="SrcDir">
<Value>$(SrcDir)</Value>
</BuildMacro>
</ItemGroup>
</Project>

View File

@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ripple2010", "ripple2010.vcxproj", "{19465545-42EE-42FA-9CC8-F8975F8F1CC7}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RippleD", "RippleD.vcxproj", "{EE95954F-3D34-4FB1-ADBD-FE8395233026}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -9,10 +9,10 @@ Global
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{19465545-42EE-42FA-9CC8-F8975F8F1CC7}.Debug|Win32.ActiveCfg = Debug|Win32
{19465545-42EE-42FA-9CC8-F8975F8F1CC7}.Debug|Win32.Build.0 = Debug|Win32
{19465545-42EE-42FA-9CC8-F8975F8F1CC7}.Release|Win32.ActiveCfg = Release|Win32
{19465545-42EE-42FA-9CC8-F8975F8F1CC7}.Release|Win32.Build.0 = Release|Win32
{EE95954F-3D34-4FB1-ADBD-FE8395233026}.Debug|Win32.ActiveCfg = Debug|Win32
{EE95954F-3D34-4FB1-ADBD-FE8395233026}.Debug|Win32.Build.0 = Debug|Win32
{EE95954F-3D34-4FB1-ADBD-FE8395233026}.Release|Win32.ActiveCfg = Release|Win32
{EE95954F-3D34-4FB1-ADBD-FE8395233026}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@@ -0,0 +1,98 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{EE95954F-3D34-4FB1-ADBD-FE8395233026}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>RippleD</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="RippleD.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<MinimalRebuild>false</MinimalRebuild>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<MinimalRebuild>false</MinimalRebuild>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\modules\ripple_app\ripple_app_pt1.cpp" />
<ClCompile Include="..\..\modules\ripple_app\ripple_app_pt2.cpp" />
<ClCompile Include="..\..\modules\ripple_app\ripple_app_pt3.cpp" />
<ClCompile Include="..\..\modules\ripple_app\ripple_app_pt4.cpp" />
<ClCompile Include="..\..\modules\ripple_basics\ripple_basics.cpp" />
<ClCompile Include="..\..\modules\ripple_data\ripple_data.cpp" />
<ClCompile Include="..\..\src\cpp\database\sqlite3.c" />
<ClCompile Include="..\..\src\cpp\leveldb_core.cpp" />
<ClCompile Include="..\..\src\cpp\protobuf_core.cpp" />
<ClCompile Include="..\..\src\cpp\websocket_core.cpp" />
<ClCompile Include="..\..\Subtrees\beast\modules\beast_basics\beast_basics.cpp" />
<ClCompile Include="..\..\Subtrees\beast\modules\beast_core\beast_core.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ClCompile Include="..\..\modules\ripple_app\ripple_app_pt1.cpp" />
<ClCompile Include="..\..\modules\ripple_app\ripple_app_pt2.cpp" />
<ClCompile Include="..\..\modules\ripple_app\ripple_app_pt3.cpp" />
<ClCompile Include="..\..\modules\ripple_app\ripple_app_pt4.cpp" />
<ClCompile Include="..\..\modules\ripple_basics\ripple_basics.cpp" />
<ClCompile Include="..\..\modules\ripple_data\ripple_data.cpp" />
<ClCompile Include="..\..\Subtrees\beast\modules\beast_basics\beast_basics.cpp">
<Filter>Subtrees</Filter>
</ClCompile>
<ClCompile Include="..\..\Subtrees\beast\modules\beast_core\beast_core.cpp">
<Filter>Subtrees</Filter>
</ClCompile>
<ClCompile Include="..\..\src\cpp\leveldb_core.cpp">
<Filter>Subtrees</Filter>
</ClCompile>
<ClCompile Include="..\..\src\cpp\protobuf_core.cpp">
<Filter>Subtrees</Filter>
</ClCompile>
<ClCompile Include="..\..\src\cpp\websocket_core.cpp">
<Filter>Subtrees</Filter>
</ClCompile>
<ClCompile Include="..\..\src\cpp\database\sqlite3.c">
<Filter>Subtrees</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<Filter Include="Ripple">
<UniqueIdentifier>{63db902e-0e7a-42d1-b5f5-663e4b48786c}</UniqueIdentifier>
</Filter>
<Filter Include="Subtrees">
<UniqueIdentifier>{469e8a0a-64bf-4fa1-8b6f-81207db68577}</UniqueIdentifier>
</Filter>
</ItemGroup>
</Project>

View File

@@ -1,9 +1,9 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Express 2012 for Windows Desktop
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "newcoin", "newcoin.vcxproj", "{19465545-42EE-42FA-9CC8-F8975F8F1CC7}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RippleD", "RippleD.vcxproj", "{19465545-42EE-42FA-9CC8-F8975F8F1CC7}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "beast", "Subtrees\beast\Builds\VisualStudio2012\beast.vcxproj", "{73C5A0F0-7629-4DE7-9194-BE7AC6C19535}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "beast", "..\..\Subtrees\beast\Builds\VisualStudio2012\beast.vcxproj", "{73C5A0F0-7629-4DE7-9194-BE7AC6C19535}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -19,7 +19,8 @@ Global
{19465545-42EE-42FA-9CC8-F8975F8F1CC7}.Debug|x64.Build.0 = Debug|x64
{19465545-42EE-42FA-9CC8-F8975F8F1CC7}.Release|Win32.ActiveCfg = Release|Win32
{19465545-42EE-42FA-9CC8-F8975F8F1CC7}.Release|Win32.Build.0 = Release|Win32
{19465545-42EE-42FA-9CC8-F8975F8F1CC7}.Release|x64.ActiveCfg = Release|Win32
{19465545-42EE-42FA-9CC8-F8975F8F1CC7}.Release|x64.ActiveCfg = Release|x64
{19465545-42EE-42FA-9CC8-F8975F8F1CC7}.Release|x64.Build.0 = Release|x64
{73C5A0F0-7629-4DE7-9194-BE7AC6C19535}.Debug|Win32.ActiveCfg = Debug|Win32
{73C5A0F0-7629-4DE7-9194-BE7AC6C19535}.Debug|Win32.Build.0 = Debug|Win32
{73C5A0F0-7629-4DE7-9194-BE7AC6C19535}.Debug|x64.ActiveCfg = Debug|Win32

View File

@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros">
<RepoDir>..\..</RepoDir>
<SrcDir>$(RepoDir)\src\cpp\ripple</SrcDir>
</PropertyGroup>
<PropertyGroup>
<OutDir>$(RepoDir)\build\VisualStudio2012\$(Configuration).$(Platform)\</OutDir>
<IntDir>$(RepoDir)\build\obj\VisualStudio2012\$(Configuration).$(Platform)\</IntDir>
<TargetName>rippled</TargetName>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<PreprocessorDefinitions>USE_LEVELDB;BOOST_TEST_ALTERNATIVE_INIT_API;BOOST_TEST_NO_MAIN;_WIN32_WINNT=0x0600;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<WarningLevel>Level3</WarningLevel>
<AdditionalIncludeDirectories>$(RepoDir);$(RepoDir)\src\cpp\protobuf\src;$(RepoDir)\src\cpp\protobuf\vsprojects;$(RepoDir)\build\proto;$(RepoDir)\Subtrees;$(RepoDir)\Subtrees\leveldb;$(RepoDir)\Subtrees\leveldb\include;$(RepoDir)\Subtrees\beast;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
<ExceptionHandling>Async</ExceptionHandling>
</ClCompile>
<Link>
<AdditionalDependencies>Shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<BuildMacro Include="RepoDir">
<Value>$(RepoDir)</Value>
</BuildMacro>
<BuildMacro Include="SrcDir">
<Value>$(SrcDir)</Value>
</BuildMacro>
</ItemGroup>
</Project>

File diff suppressed because it is too large Load Diff

1
Builds/XCode/README.txt Normal file
View File

@@ -0,0 +1 @@
Place XCode project file here!

View File

@@ -1,7 +1,16 @@
# Form
- One class per header file.
- Place each data member on its own line.
- Place each ctor-initializer on its own line.
- Create typedefs for primitive types to describe them.
- Return descriptive local variables instead of constants.
- Use long descriptive names instead of abbreviations.
- Use "explicit" for single-argument ctors
- Avoid globals especially objects with static storage duration
# Function
- Minimize external dependencies
* Pass options in the ctor instead of using theConfig
* Use as few other classes as possible

BIN
LICENSE

Binary file not shown.

View File

@@ -92,11 +92,12 @@ else:
INCLUDE_PATHS = [
'.',
'build/proto',
'src/cpp/leveldb',
'src/cpp/leveldb/port',
'src/cpp/leveldb/include',
'src/cpp/ripple',
'Subtrees/beast'
'Subtrees',
'Subtrees/leveldb',
'Subtrees/leveldb/port',
'Subtrees/leveldb/include',
'Subtrees/beast',
'src/cpp/ripple'
]
COMPILED_FILES = [
@@ -160,6 +161,7 @@ env.Append(LINKFLAGS = ['-rdynamic', '-pthread'])
env.Append(CCFLAGS = ['-pthread', '-Wall', '-Wno-sign-compare', '-Wno-char-subscripts', '-DSQLITE_THREADSAFE=1'])
env.Append(CXXFLAGS = ['-O0', '-pthread', '-Wno-invalid-offsetof', '-Wformat']+BOOSTFLAGS+DEBUGFLAGS)
env.Append(CXXFLAGS = ['-DUSE_LEVELDB'])
env.Append(CXXFLAGS = ['-frtti'])
if (int(GCC_VERSION[0]) > 4 or (int(GCC_VERSION[0]) == 4 and int(GCC_VERSION[1]) >= 7)):
env.Append(CXXFLAGS = ['-std=c++11'])

45
Subtrees/README.md Normal file
View File

@@ -0,0 +1,45 @@
# Subtrees
These directories come from entire outside repositories
brought in using git-subtree.
About git-subtree:
https://github.com/apenwarr/git-subtree <br>
http://blogs.atlassian.com/2013/05/alternatives-to-git-submodule-git-subtree/ <br>
## LevelDB
Repository <br>
```
git@github.com:vinniefalco/LevelDB.git
```
Branch
```
ripple-fork
```
## websocket
Repository
```
git@github.com:vinniefalco/websocketpp.git
```
Branch
```
ripple-fork
```
## protobuf
Repository
```
git@github.com:vinniefalco/protobuf.git
```
Branch
```
master
```
**NOTE** Linux builds use the protobuf installed in /usr/lib. This will be
fixed in a future revision.

View File

@@ -1,2 +0,0 @@
These directories come from entire outside repositories
brought in using git-subtree.

View File

@@ -40,7 +40,10 @@
#include <locale>
#include <cctype>
#include <sys/timeb.h>
#if ! BEAST_BSD
#include <sys/timeb.h>
#endif
#if ! BEAST_ANDROID
#include <cwctype>
@@ -85,7 +88,7 @@
#include <net/if.h>
#include <sys/ioctl.h>
#if ! BEAST_ANDROID
#if ! BEAST_ANDROID && ! BEAST_BSD
#include <execinfo.h>
#endif
#endif

View File

@@ -68,11 +68,11 @@
#elif BEAST_WINDOWS
#if BEAST_MSVC
#ifndef _CPPRTTI
#error "You're compiling without RTTI enabled! This is needed for a lot of BEAST classes, please update your compiler settings!"
#error "Beast requires RTTI!"
#endif
#ifndef _CPPUNWIND
#error "You're compiling without exceptions enabled! This is needed for a lot of BEAST classes, please update your compiler settings!"
#error "Beast requires RTTI!"
#endif
#pragma warning (push)
@@ -161,15 +161,13 @@
type##localFunctionName localFunctionName = (type##localFunctionName) dll.getFunction (#functionName);
//==============================================================================
#elif BEAST_LINUX
#elif BEAST_LINUX || BEAST_BSD
#include <sched.h>
#include <pthread.h>
#include <sys/time.h>
#include <errno.h>
#include <sys/stat.h>
#include <sys/dir.h>
#include <sys/ptrace.h>
#include <sys/vfs.h>
#include <sys/wait.h>
#include <sys/mman.h>
#include <fnmatch.h>
@@ -184,12 +182,21 @@
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <net/if.h>
#include <sys/sysinfo.h>
#include <sys/file.h>
#include <sys/prctl.h>
#include <signal.h>
#include <stddef.h>
#if BEAST_BSD
#include <dirent.h>
#include <sys/param.h>
#include <sys/mount.h>
#else
#include <sys/dir.h>
#include <sys/vfs.h>
#include <sys/sysinfo.h>
#include <sys/prctl.h>
#endif
//==============================================================================
#elif BEAST_ANDROID
#include <jni.h>

View File

@@ -177,7 +177,8 @@ bool File::setAsCurrentWorkingDirectory() const
//==============================================================================
namespace
{
#if BEAST_LINUX || (BEAST_IOS && ! __DARWIN_ONLY_64_BIT_INO_T) // (this iOS stuff is to avoid a simulator bug)
#if BEAST_LINUX || \
(BEAST_IOS && ! __DARWIN_ONLY_64_BIT_INO_T) // (this iOS stuff is to avoid a simulator bug)
typedef struct stat64 beast_statStruct;
#define BEAST_STAT stat64
#else
@@ -1217,7 +1218,11 @@ private:
t.tv_sec = (time_t) (time / 1000000000);
t.tv_nsec = (long) (time % 1000000000);
#if BEAST_BSD
bassertfalse; // unimplemented
#else
clock_nanosleep (CLOCK_MONOTONIC, TIMER_ABSTIME, &t, nullptr);
#endif
}
uint64 time, delta;

View File

@@ -68,7 +68,7 @@ String SystemStats::getStackBacktrace()
{
String result;
#if BEAST_ANDROID || BEAST_MINGW
#if BEAST_ANDROID || BEAST_MINGW || BEAST_BSD
bassertfalse; // sorry, not implemented yet!
#elif BEAST_WINDOWS

View File

@@ -59,6 +59,8 @@
#else
#define BEAST_MAC 1
#endif
#elif defined (__FreeBSD__)
#define BEAST_BSD 1
#else
#error "Unknown platform!"
#endif
@@ -135,7 +137,7 @@
#endif
//==============================================================================
#if BEAST_LINUX || BEAST_ANDROID
#if BEAST_LINUX || BEAST_ANDROID || BEAST_BSD
#ifdef _DEBUG
#define BEAST_DEBUG 1

Some files were not shown because too many files have changed in this diff Show More