Fabcoin Core
0.16.2
P2P Digital Currency
|
Manages real accounts (where we know the secret key) and proxy accounts (where transactions to be sent from these accounts are forwarded to a proxy on the other side). More...
#include <AccountHolder.h>
Public Member Functions | |
AccountHolder (std::function< Interface *()> const &_client) | |
virtual AddressHash | realAccounts () const =0 |
virtual TransactionNotification | authenticate (dev::eth::TransactionSkeleton const &_t)=0 |
Addresses | allAccounts () const |
bool | isRealAccount (Address const &_account) const |
bool | isProxyAccount (Address const &_account) const |
Address const & | defaultTransactAccount () const |
virtual bool | unlockAccount (Address const &, std::string const &, unsigned) |
Automatically authenticate all transactions for the given account for the next _duration seconds. More... | |
int | addProxyAccount (Address const &_account) |
bool | removeProxyAccount (unsigned _id) |
void | queueTransaction (eth::TransactionSkeleton const &_transaction) |
std::vector< eth::TransactionSkeleton > const & | queuedTransactions (int _id) const |
void | clearQueue (int _id) |
Protected Attributes | |
std::function< Interface *()> | m_client |
Private Types | |
using | TransactionQueue = std::vector< eth::TransactionSkeleton > |
Private Attributes | |
std::unordered_map< Address, int > | m_proxyAccounts |
std::unordered_map< int, std::pair< Address, TransactionQueue > > | m_transactionQueues |
Manages real accounts (where we know the secret key) and proxy accounts (where transactions to be sent from these accounts are forwarded to a proxy on the other side).
Definition at line 64 of file AccountHolder.h.
|
private |
Definition at line 102 of file AccountHolder.h.
|
inlineexplicit |
Definition at line 67 of file AccountHolder.h.
int AccountHolder::addProxyAccount | ( | Address const & | _account | ) |
Definition at line 61 of file AccountHolder.cpp.
vector< Address > AccountHolder::allAccounts | ( | ) | const |
|
pure virtual |
Implemented in dev::eth::FixedAccountHolder, and dev::eth::SimpleAccountHolder.
void AccountHolder::clearQueue | ( | int | _id | ) |
Address const & AccountHolder::defaultTransactAccount | ( | ) | const |
|
inline |
Definition at line 76 of file AccountHolder.h.
|
inline |
Definition at line 75 of file AccountHolder.h.
vector< TransactionSkeleton > const & AccountHolder::queuedTransactions | ( | int | _id | ) | const |
void AccountHolder::queueTransaction | ( | eth::TransactionSkeleton const & | _transaction | ) |
|
pure virtual |
Implemented in dev::eth::FixedAccountHolder, and dev::eth::SimpleAccountHolder.
bool AccountHolder::removeProxyAccount | ( | unsigned | _id | ) |
|
inlinevirtual |
Automatically authenticate all transactions for the given account for the next _duration seconds.
Decrypt the key with _password if needed.
Reimplemented in dev::eth::SimpleAccountHolder.
Definition at line 82 of file AccountHolder.h.
|
protected |
Definition at line 99 of file AccountHolder.h.
|
private |
Definition at line 104 of file AccountHolder.h.
|
private |
Definition at line 105 of file AccountHolder.h.