mirror of
https://github.com/XRPLF/rippled.git
synced 2026-07-24 07:30:30 +00:00
fix more AccountRoot stuff
This commit is contained in:
@@ -29,7 +29,7 @@ protected:
|
||||
|
||||
public:
|
||||
AccountRoot(AccountID const& id, ReadView const& view)
|
||||
: ReadOnlySLE(view->read(keylet::account(id)), view), id_(id)
|
||||
: ReadOnlySLE(view.read(keylet::account(id)), view), id_(id)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ class WritableAccountRoot : public AccountRoot, public WritableSLE
|
||||
{
|
||||
public:
|
||||
WritableAccountRoot(AccountID const& id, ApplyView& view)
|
||||
: AccountRoot(id, view), WritableSLE(view->peek(keylet::account(id)), view)
|
||||
: AccountRoot(id, view), WritableSLE(view.peek(keylet::account(id)), view)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ pseudoAccountAddress(ReadView const& view, uint256 const& pseudoOwnerKey);
|
||||
Pseudo-account designator fields MUST be maintained by including the
|
||||
SField::sMD_PseudoAccount flag in the SField definition.
|
||||
*/
|
||||
[[nodiscard]] std::vector<SField&> const&
|
||||
[[nodiscard]] std::vector<SField const*> const&
|
||||
getPseudoAccountFields();
|
||||
|
||||
/** Returns true if and only if sleAcct is a pseudo-account or specific
|
||||
@@ -127,7 +127,7 @@ getPseudoAccountFields();
|
||||
[[nodiscard]] bool
|
||||
isPseudoAccount(
|
||||
std::shared_ptr<SLE const> sleAcct,
|
||||
std::set<SField&> const& pseudoFieldFilter = {});
|
||||
std::set<SField const*> const& pseudoFieldFilter = {});
|
||||
|
||||
/** Convenience overload that reads the account from the view. */
|
||||
[[nodiscard]] inline bool
|
||||
|
||||
@@ -119,7 +119,7 @@ public:
|
||||
bool
|
||||
canModify() const
|
||||
{
|
||||
return applyView_ != nullptr && mutableSle_ != nullptr;
|
||||
return mutableSle_ != nullptr;
|
||||
}
|
||||
|
||||
/** Returns the apply view for write operations */
|
||||
@@ -147,28 +147,28 @@ public:
|
||||
insert()
|
||||
{
|
||||
XRPL_ASSERT(canModify(), "xrpl::WritableSLE::insert : can modify");
|
||||
applyView_->insert(mutableSle_);
|
||||
applyView_.insert(mutableSle_);
|
||||
}
|
||||
|
||||
void
|
||||
erase()
|
||||
{
|
||||
XRPL_ASSERT(canModify(), "xrpl::WritableSLE::erase : can modify");
|
||||
applyView_->erase(mutableSle_);
|
||||
applyView_.erase(mutableSle_);
|
||||
}
|
||||
|
||||
void
|
||||
update()
|
||||
{
|
||||
XRPL_ASSERT(canModify(), "xrpl::WritableSLE::update : can modify");
|
||||
applyView_->update(mutableSle_);
|
||||
applyView_.update(mutableSle_);
|
||||
}
|
||||
|
||||
protected:
|
||||
WritableSLE() = default;
|
||||
|
||||
/** Constructor for read-write context (ApplyView) */
|
||||
explicit WritableSLE(std::shared_ptr<SLE> sle, ApplyView* view)
|
||||
explicit WritableSLE(std::shared_ptr<SLE> sle, ApplyView& view)
|
||||
: mutableSle_(std::move(sle)), applyView_(view)
|
||||
{
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user