rippled
Loading...
Searching...
No Matches
Classes | Public Member Functions | Private Types | Static Private Member Functions | Private Attributes | List of all members
ripple::detail::DeferredCredits Class Reference

#include <PaymentSandbox.h>

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 17 of file PaymentSandbox.h.

Member Typedef Documentation

◆ Key

Definition at line 60 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 94 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 23 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 69 of file PaymentSandbox.cpp.

◆ ownerCount() [2/2]

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

Definition at line 84 of file PaymentSandbox.cpp.

◆ apply()

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

Definition at line 123 of file PaymentSandbox.cpp.

◆ makeKey()

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

Definition at line 11 of file PaymentSandbox.cpp.

Member Data Documentation

◆ credits_

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

Definition at line 73 of file PaymentSandbox.h.

◆ ownerCounts_

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

Definition at line 74 of file PaymentSandbox.h.