mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-29 15:35:50 +00:00
Move Wallet files to ripple_ledger module
This commit is contained in:
@@ -33,10 +33,13 @@
|
||||
|
||||
#include "ripple_ledger.h"
|
||||
|
||||
//#define WIN32_LEAN_AND_MEAN
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <openssl/ec.h>
|
||||
#include <openssl/ripemd.h>
|
||||
#include <openssl/sha.h>
|
||||
#include <string>
|
||||
@@ -182,6 +185,8 @@
|
||||
#include "src/cpp/ripple/TransactionQueue.cpp" // no log
|
||||
#include "src/cpp/ripple/Transactor.cpp"
|
||||
#include "src/cpp/ripple/TrustSetTransactor.cpp"
|
||||
#include "src/cpp/ripple/Wallet.cpp"
|
||||
#include "src/cpp/ripple/WalletAddTransactor.cpp"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
//#pragma warning (pop)
|
||||
|
||||
@@ -988,7 +988,12 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\cpp\ripple\Suppression.cpp" />
|
||||
<ClCompile Include="src\cpp\ripple\Suppression.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\cpp\ripple\Transaction.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
@@ -1055,7 +1060,12 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\cpp\ripple\UniqueNodeList.cpp" />
|
||||
<ClCompile Include="src\cpp\ripple\UniqueNodeList.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\cpp\ripple\UpdateTables.cpp" />
|
||||
<ClCompile Include="src\cpp\ripple\utils.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
@@ -1069,8 +1079,18 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\cpp\ripple\Wallet.cpp" />
|
||||
<ClCompile Include="src\cpp\ripple\WalletAddTransactor.cpp" />
|
||||
<ClCompile Include="src\cpp\ripple\Wallet.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\cpp\ripple\WalletAddTransactor.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\cpp\ripple\WSDoor.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
|
||||
@@ -412,12 +412,6 @@
|
||||
<ClCompile Include="src\cpp\ripple\UpdateTables.cpp">
|
||||
<Filter>Unsorted Sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\cpp\ripple\Wallet.cpp">
|
||||
<Filter>Unsorted Sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\cpp\ripple\WalletAddTransactor.cpp">
|
||||
<Filter>Unsorted Sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\cpp\websocket_core.cpp">
|
||||
<Filter>0. Third Party Code\websocket</Filter>
|
||||
</ClCompile>
|
||||
@@ -727,6 +721,12 @@
|
||||
<ClCompile Include="src\cpp\ripple\RippleAddress.cpp">
|
||||
<Filter>1. Modules\ripple_basics\types</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\cpp\ripple\WalletAddTransactor.cpp">
|
||||
<Filter>1. Modules\ripple_ledger\transactions</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\cpp\ripple\Wallet.cpp">
|
||||
<Filter>1. Modules\ripple_ledger\transactions</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="database\sqlite3ext.h">
|
||||
@@ -1044,12 +1044,6 @@
|
||||
<ClInclude Include="src\cpp\ripple\Version.h">
|
||||
<Filter>Unsorted Sources</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\cpp\ripple\Wallet.h">
|
||||
<Filter>Unsorted Sources</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\cpp\ripple\WalletAddTransactor.h">
|
||||
<Filter>Unsorted Sources</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\cpp\ripple\ScopedLock.h">
|
||||
<Filter>Unsorted Sources</Filter>
|
||||
</ClInclude>
|
||||
@@ -1365,6 +1359,12 @@
|
||||
<ClInclude Include="src\cpp\ripple\RippleAddress.h">
|
||||
<Filter>1. Modules\ripple_basics\types</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\cpp\ripple\WalletAddTransactor.h">
|
||||
<Filter>1. Modules\ripple_ledger\transactions</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\cpp\ripple\Wallet.h">
|
||||
<Filter>1. Modules\ripple_ledger\transactions</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="wallet.xml" />
|
||||
|
||||
@@ -1,19 +1,3 @@
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "openssl/ec.h"
|
||||
|
||||
#include <boost/foreach.hpp>
|
||||
#include <boost/format.hpp>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include <boost/make_shared.hpp>
|
||||
|
||||
#include "Wallet.h"
|
||||
#include "Ledger.h"
|
||||
#include "RippleAddress.h"
|
||||
#include "Application.h"
|
||||
#include "utils.h"
|
||||
|
||||
Wallet::Wallet() : mDh512(NULL), mDh1024(NULL), mLedger(0)
|
||||
{ ; }
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
#include "WalletAddTransactor.h"
|
||||
|
||||
SETUP_LOG();
|
||||
|
||||
TER WalletAddTransactor::doApply()
|
||||
{
|
||||
std::cerr << "WalletAdd>" << std::endl;
|
||||
@@ -16,7 +12,7 @@ TER WalletAddTransactor::doApply()
|
||||
|
||||
if (uTxFlags)
|
||||
{
|
||||
cLog(lsINFO) << "WalletAdd: Malformed transaction: Invalid flags set.";
|
||||
WriteLog (lsINFO, WalletAddTransactor) << "WalletAdd: Malformed transaction: Invalid flags set.";
|
||||
|
||||
return temINVALID_FLAG;
|
||||
}
|
||||
@@ -50,7 +46,7 @@ TER WalletAddTransactor::doApply()
|
||||
if (saSrcBalance + saPaid < saDstAmount + uReserve) // Reserve is not scaled by fee.
|
||||
{
|
||||
// Vote no. However, transaction might succeed, if applied in a different order.
|
||||
cLog(lsINFO) << boost::str(boost::format("WalletAdd: Delay transaction: Insufficient funds: %s / %s (%d)")
|
||||
WriteLog (lsINFO, WalletAddTransactor) << boost::str(boost::format("WalletAdd: Delay transaction: Insufficient funds: %s / %s (%d)")
|
||||
% saSrcBalance.getText() % (saDstAmount + uReserve).getText() % uReserve);
|
||||
|
||||
return tecUNFUNDED_ADD;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include "Transactor.h"
|
||||
|
||||
#ifndef WALLETADDTRANSACTOR_H
|
||||
#define WALLETADDTRANSACTOR_H
|
||||
|
||||
class WalletAddTransactor : public Transactor
|
||||
{
|
||||
@@ -8,5 +8,6 @@ public:
|
||||
|
||||
TER doApply();
|
||||
};
|
||||
#endif
|
||||
|
||||
// vim:ts=4
|
||||
|
||||
Reference in New Issue
Block a user