Skip to content
This repository has been archived by the owner on Jan 18, 2019. It is now read-only.

Commit

Permalink
Added AccountDeleteTransaction skeleton.
Browse files Browse the repository at this point in the history
  • Loading branch information
marco89nish committed May 2, 2014
1 parent 0d6dc2e commit 0419b14
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 0 deletions.
1 change: 1 addition & 0 deletions Builds/VisualStudio2013/RippleD.vcxproj
Expand Up @@ -2546,6 +2546,7 @@
<ClInclude Include="..\..\src\ripple_app\shamap\SHAMapSyncFilters.h" />
<ClInclude Include="..\..\src\ripple_app\shamap\RadixMapTest.h" />
<ClInclude Include="..\..\src\ripple_app\shamap\SHAMapTreeNode.h" />
<ClInclude Include="..\..\src\ripple_app\transactors\AccountDeleteTransactor.h" />
<ClInclude Include="..\..\src\ripple_app\transactors\AccountSetTransactor.h" />
<ClInclude Include="..\..\src\ripple_app\transactors\ChangeTransactor.h" />
<ClInclude Include="..\..\src\ripple_app\transactors\OfferCancelTransactor.h" />
Expand Down
3 changes: 3 additions & 0 deletions Builds/VisualStudio2013/RippleD.vcxproj.filters
Expand Up @@ -3051,6 +3051,9 @@
<ClInclude Include="..\..\src\ripple\common\byte_view.h">
<Filter>[1] Ripple\common</Filter>
</ClInclude>
<ClInclude Include="..\..\src\ripple_app\transactors\AccountDeleteTransactor.h">
<Filter>[2] Old Ripple\ripple_app\transactors</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="..\..\src\ripple_data\protocol\ripple.proto">
Expand Down
1 change: 1 addition & 0 deletions src/ripple_app/ripple_app_pt9.cpp
Expand Up @@ -28,5 +28,6 @@
#include "transactors/PaymentTransactor.cpp"
#include "transactors/RegularKeySetTransactor.cpp"
#include "transactors/AccountSetTransactor.cpp"
//#include "transactors/AccountDeleteTransactor.cpp" //TODO
#include "transactors/WalletAddTransactor.cpp"
#include "transactors/TrustSetTransactor.cpp"
35 changes: 35 additions & 0 deletions src/ripple_app/transactors/AccountDeleteTransactor.h
@@ -0,0 +1,35 @@
//------------------------------------------------------------------------------
/*
This file is part of rippled: https://github.com/ripple/rippled
Copyright (c) 2012, 2013 Ripple Labs Inc.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
//==============================================================================

#ifndef ACCOUNTDELETETRANSACTOR_H
#define ACCOUNTDELETETRANSACTOR_H

namespace ripple {

class AccountDeleteTransactor : public Transactor
{
public:
AccountDeleteTransactor(const SerializedTransaction& txn, TransactionEngineParams params, TransactionEngine* engine) : Transactor(txn, params, engine) {}

TER doApply() { return tefINTERNAL; } // TODO
};

}

#endif
5 changes: 5 additions & 0 deletions src/ripple_app/transactors/Transactor.cpp
Expand Up @@ -24,6 +24,7 @@
#include "PaymentTransactor.h"
#include "RegularKeySetTransactor.h"
#include "AccountSetTransactor.h"
#include "AccountDeleteTransactor.h"
#include "TrustSetTransactor.h"
#include "WalletAddTransactor.h"

Expand All @@ -44,6 +45,10 @@ std::unique_ptr<Transactor> Transactor::makeTransactor (
return std::unique_ptr<Transactor> (
new AccountSetTransactor (txn, params, engine));

case ttACCOUNT_DELETE:
return std::unique_ptr<Transactor>(
new AccountDeleteTransactor (txn, params, engine));

case ttREGULAR_KEY_SET:
return std::unique_ptr<Transactor> (
new RegularKeySetTransactor (txn, params, engine));
Expand Down
5 changes: 5 additions & 0 deletions src/ripple_data/protocol/TxFormats.cpp
Expand Up @@ -31,6 +31,11 @@ TxFormats::TxFormats ()
<< SOElement (sfInflationDest, SOE_OPTIONAL)
;

add("AccountDelete", ttACCOUNT_DELETE)
<< SOElement (sfDestination, SOE_REQUIRED)
// TODO
;

add ("TrustSet", ttTRUST_SET)
<< SOElement (sfLimitAmount, SOE_OPTIONAL)
<< SOElement (sfQualityIn, SOE_OPTIONAL)
Expand Down
2 changes: 2 additions & 0 deletions src/ripple_data/protocol/TxFormats.h
Expand Up @@ -44,6 +44,8 @@ enum TxType

ttTRUST_SET = 20,

ttACCOUNT_DELETE = 30,

ttFEATURE = 100,
ttFEE = 101,
};
Expand Down

0 comments on commit 0419b14

Please sign in to comment.