mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Missing helper functions.
This commit is contained in:
@@ -452,6 +452,22 @@ void STObject::setValueFieldH160(SOE_Field field, const uint160& v)
|
||||
cf->setValue(v);
|
||||
}
|
||||
|
||||
void STObject::setValueFieldAccount(SOE_Field field, const uint160& v)
|
||||
{
|
||||
SerializedType* rf = getPField(field);
|
||||
if (!rf) throw std::runtime_error("Field not found");
|
||||
SerializedTypeID id = rf->getSType();
|
||||
if (id == STI_OBJECT)
|
||||
{
|
||||
makeFieldPresent(field);
|
||||
rf = getPField(field);
|
||||
id = rf->getSType();
|
||||
}
|
||||
STAccount* cf = dynamic_cast<STAccount*>(rf);
|
||||
if (!cf) throw std::runtime_error("Wrong field type");
|
||||
cf->setValueH160(v);
|
||||
}
|
||||
|
||||
void STObject::setValueFieldVL(SOE_Field field, const std::vector<unsigned char>& v)
|
||||
{
|
||||
SerializedType* rf = getPField(field);
|
||||
|
||||
Reference in New Issue
Block a user