Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove MPT dir #13

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Builds/CMake/RippledCore.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,6 @@ target_sources (rippled PRIVATE
src/ripple/rpc/handlers/BlackList.cpp
src/ripple/rpc/handlers/BookOffers.cpp
src/ripple/rpc/handlers/CanDelete.cpp
src/ripple/rpc/handlers/MPTHolders.cpp
src/ripple/rpc/handlers/Connect.cpp
src/ripple/rpc/handlers/ConsensusInfo.cpp
src/ripple/rpc/handlers/CrawlShards.cpp
Expand Down
18 changes: 0 additions & 18 deletions src/ripple/app/tx/impl/MPTokenAuthorize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,13 +182,6 @@ MPTokenAuthorize::doApply()
false))
return tecINTERNAL;

if (!view().dirRemove(
keylet::mpt_dir(mptIssuanceID),
(*sleMpt)[sfMPTokenNode],
sleMpt->key(),
false))
return tecINTERNAL;

adjustOwnerCount(view(), sleAcct, -1, j_);

view().erase(sleMpt);
Expand All @@ -214,22 +207,11 @@ MPTokenAuthorize::doApply()
if (!ownerNode)
return tecDIR_FULL;

auto const mptNode = view().dirInsert(
keylet::mpt_dir(mptIssuanceID),
mptokenKey,
[&mptIssuanceID](std::shared_ptr<SLE> const& sle) {
(*sle)[sfMPTokenIssuanceID] = mptIssuanceID;
});

if (!mptNode)
return tecDIR_FULL;

auto mptoken = std::make_shared<SLE>(mptokenKey);
(*mptoken)[sfAccount] = account_;
(*mptoken)[sfMPTokenIssuanceID] = mptIssuanceID;
(*mptoken)[sfFlags] = 0;
(*mptoken)[sfOwnerNode] = *ownerNode;
(*mptoken)[sfMPTokenNode] = *mptNode;
view().insert(mptoken);

// Update owner count.
Expand Down
1 change: 0 additions & 1 deletion src/ripple/protocol/SField.h
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,6 @@ extern SF_UINT64 const sfCookie;
extern SF_UINT64 const sfServerVersion;
extern SF_UINT64 const sfNFTokenOfferNode;
extern SF_UINT64 const sfEmitBurden;
extern SF_UINT64 const sfMPTokenNode;

// 64-bit integers (uncommon)
extern SF_UINT64 const sfHookOn;
Expand Down
2 changes: 0 additions & 2 deletions src/ripple/protocol/impl/LedgerFormats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ LedgerFormats::LedgerFormats()
{sfIndexNext, soeOPTIONAL},
{sfIndexPrevious, soeOPTIONAL},
{sfNFTokenID, soeOPTIONAL},
{sfMPTokenIssuanceID, soeOPTIONAL},
},
commonFields);

Expand Down Expand Up @@ -366,7 +365,6 @@ LedgerFormats::LedgerFormats()
{sfMPTAmount, soeDEFAULT},
{sfLockedAmount, soeDEFAULT},
{sfOwnerNode, soeREQUIRED},
{sfMPTokenNode, soeREQUIRED},
{sfPreviousTxnID, soeREQUIRED},
{sfPreviousTxnLgrSeq, soeREQUIRED}
},
Expand Down
1 change: 0 additions & 1 deletion src/ripple/protocol/impl/SField.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ CONSTRUCT_TYPED_SFIELD(sfCookie, "Cookie", UINT64,
CONSTRUCT_TYPED_SFIELD(sfServerVersion, "ServerVersion", UINT64, 11);
CONSTRUCT_TYPED_SFIELD(sfNFTokenOfferNode, "NFTokenOfferNode", UINT64, 12);
CONSTRUCT_TYPED_SFIELD(sfEmitBurden, "EmitBurden", UINT64, 13);
CONSTRUCT_TYPED_SFIELD(sfMPTokenNode, "MPTokenNode", UINT64, 14);

// 64-bit integers (uncommon)
CONSTRUCT_TYPED_SFIELD(sfHookOn, "HookOn", UINT64, 16);
Expand Down
164 changes: 0 additions & 164 deletions src/ripple/rpc/handlers/MPTHolders.cpp

This file was deleted.

2 changes: 1 addition & 1 deletion src/ripple/rpc/impl/Handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ Handler const handlerArray[]{
{"book_changes", byRef(&doBookChanges), Role::USER, NO_CONDITION},
{"book_offers", byRef(&doBookOffers), Role::USER, NO_CONDITION},
{"can_delete", byRef(&doCanDelete), Role::ADMIN, NO_CONDITION},
{"mpt_holders", byRef(&doMPTHolders), Role::USER, NO_CONDITION},
//{"mpt_holders", byRef(&doMPTHolders), Role::ADMIN, NO_CONDITION},
{"channel_authorize", byRef(&doChannelAuthorize), Role::USER, NO_CONDITION},
{"channel_verify", byRef(&doChannelVerify), Role::USER, NO_CONDITION},
{"connect", byRef(&doConnect), Role::ADMIN, NO_CONDITION},
Expand Down
Loading
Loading