mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Reduce interface to STAccount (RIPD-994):
Since a non-default STAccount is now guaranteed to always be 160 bits, it was possible to reduce the number of methods that it provides. In the process of narrowing the STAccount interface it became reasonable to remove some methods that duplicated functionality. A few classes offered both a value() and a getValue() method. The getValue() method is removed from those classes.
This commit is contained in:
committed by
Nik Bougalis
parent
f72b14ec36
commit
289bc7deb3
@@ -134,10 +134,9 @@ STTx::getMentionedAccounts () const
|
||||
{
|
||||
if (auto sa = dynamic_cast<STAccount const*> (&it))
|
||||
{
|
||||
AccountID id;
|
||||
assert(sa->isValueH160());
|
||||
if (sa->getValueH160(id))
|
||||
list.insert(id);
|
||||
assert(! sa->isDefault());
|
||||
if (! sa->isDefault())
|
||||
list.insert(sa->value());
|
||||
}
|
||||
else if (auto sa = dynamic_cast<STAmount const*> (&it))
|
||||
{
|
||||
@@ -488,7 +487,7 @@ isAccountFieldOkay (STObject const& st)
|
||||
for (int i = 0; i < st.getCount(); ++i)
|
||||
{
|
||||
auto t = dynamic_cast<STAccount const*>(st.peekAtPIndex (i));
|
||||
if (t && !t->isValueH160 ())
|
||||
if (t && t->isDefault ())
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user