rippled
Classes | Public Member Functions | Private Types | Static Private Member Functions | Private Attributes | List of all members
ripple::detail::DeferredCredits Class Reference
Collaboration diagram for ripple::detail::DeferredCredits:
Collaboration graph
[legend]

Classes

struct  Adjustment
 
struct  Value
 

Public Member Functions

std::optional< Adjustmentadjustments (AccountID const &main, AccountID const &other, Currency const &currency) const
 
void credit (AccountID const &sender, AccountID const &receiver, STAmount const &amount, STAmount const &preCreditSenderBalance)
 
void ownerCount (AccountID const &id, std::uint32_t cur, std::uint32_t next)
 
std::optional< std::uint32_townerCount (AccountID const &id) const
 
void apply (DeferredCredits &to)
 

Private Types

using Key = std::tuple< AccountID, AccountID, Currency >
 

Static Private Member Functions

static Key makeKey (AccountID const &a1, AccountID const &a2, Currency const &c)
 

Private Attributes

std::map< Key, Valuecredits_
 
std::map< AccountID, std::uint32_townerCounts_
 

Detailed Description

Definition at line 36 of file PaymentSandbox.h.

Member Typedef Documentation

◆ Key

Definition at line 79 of file PaymentSandbox.h.

Member Function Documentation

◆ adjustments()

auto ripple::detail::DeferredCredits::adjustments ( AccountID const &  main,
AccountID const &  other,
Currency const &  currency 
) const

Definition at line 113 of file PaymentSandbox.cpp.

◆ credit()

void ripple::detail::DeferredCredits::credit ( AccountID const &  sender,
AccountID const &  receiver,
STAmount const &  amount,
STAmount const &  preCreditSenderBalance 
)

Definition at line 46 of file PaymentSandbox.cpp.

◆ ownerCount() [1/2]

void ripple::detail::DeferredCredits::ownerCount ( AccountID const &  id,
std::uint32_t  cur,
std::uint32_t  next 
)

Definition at line 88 of file PaymentSandbox.cpp.

◆ ownerCount() [2/2]

std::optional< std::uint32_t > ripple::detail::DeferredCredits::ownerCount ( AccountID const &  id) const

Definition at line 103 of file PaymentSandbox.cpp.

◆ apply()

void ripple::detail::DeferredCredits::apply ( DeferredCredits to)

Definition at line 142 of file PaymentSandbox.cpp.

◆ makeKey()

auto ripple::detail::DeferredCredits::makeKey ( AccountID const &  a1,
AccountID const &  a2,
Currency const &  c 
)
staticprivate

Definition at line 34 of file PaymentSandbox.cpp.

Member Data Documentation

◆ credits_

std::map<Key, Value> ripple::detail::DeferredCredits::credits_
private

Definition at line 92 of file PaymentSandbox.h.

◆ ownerCounts_

std::map<AccountID, std::uint32_t> ripple::detail::DeferredCredits::ownerCounts_
private

Definition at line 93 of file PaymentSandbox.h.