|
CatapultServer
v0.5.0.1 (Elephant)
|
A write only view on top of unlocked accounts. More...


Public Member Functions | |
| UnlockedAccountsModifier (size_t maxUnlockedAccounts, std::vector< crypto::KeyPair > &keyPairs, utils::SpinReaderWriterLock::ReaderLockGuard &&readLock) | |
| Creates a view around maxUnlockedAccounts and keyPairs with lock context readLock. More... | |
| UnlockedAccountsAddResult | add (crypto::KeyPair &&keyPair) |
| Adds (unlocks) the account identified by key pair (keyPair). More... | |
| void | remove (const Key &publicKey) |
| Removes (locks) the account identified by the public key (publicKey). More... | |
| void | removeIf (const KeyPredicate &predicate) |
Removes all accounts for which predicate returns true. More... | |
Private Types | |
| using | KeyPredicate = predicate< const Key & > |
Private Attributes | |
| size_t | m_maxUnlockedAccounts |
| std::vector< crypto::KeyPair > & | m_keyPairs |
| utils::SpinReaderWriterLock::ReaderLockGuard | m_readLock |
| utils::SpinReaderWriterLock::WriterLockGuard | m_writeLock |
Additional Inherited Members | |
Private Member Functions inherited from catapult::utils::MoveOnly | |
| constexpr | MoveOnly ()=default |
| Default constructor. More... | |
| ~MoveOnly ()=default | |
| Default destructor. More... | |
| MoveOnly (const NonCopyable &)=delete | |
| Disabled copy constructor. More... | |
| MoveOnly (MoveOnly &&)=default | |
| Default move constructor. More... | |
| MoveOnly & | operator= (const MoveOnly &)=delete |
| Disabled assignment operator. More... | |
| MoveOnly & | operator= (MoveOnly &&)=default |
| Default move assignment operator. More... | |
A write only view on top of unlocked accounts.
|
private |
|
inline |
Creates a view around maxUnlockedAccounts and keyPairs with lock context readLock.
| UnlockedAccountsAddResult catapult::harvesting::UnlockedAccountsModifier::add | ( | crypto::KeyPair && | keyPair | ) |
Adds (unlocks) the account identified by key pair (keyPair).
| void catapult::harvesting::UnlockedAccountsModifier::remove | ( | const Key & | publicKey | ) |
Removes (locks) the account identified by the public key (publicKey).
| void catapult::harvesting::UnlockedAccountsModifier::removeIf | ( | const KeyPredicate & | predicate | ) |
Removes all accounts for which predicate returns true.

|
private |
|
private |
|
private |
|
private |