mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Catch up the consequences of Number changes
- Change the Number::maxIntValue to all 9's. - Add integral() to Asset (copied from Lending) - Add toNumber() functions to STAmount, MPTAmount, XRPAmount to allow explicit conversions with enforcement options. - Add optional Number::EnforceInteger options to STAmount and STNumber ctors, conversions, etc. IOUs are never checked. - Update Vault transactors, and helper functions, to check restrictions. - Fix and add Vault tests.
This commit is contained in:
@@ -56,6 +56,18 @@ public:
|
||||
bool
|
||||
isDefault() const override;
|
||||
|
||||
/// Sets the flag on the underlying number
|
||||
void
|
||||
setIntegerEnforcement(Number::EnforceInteger enforce);
|
||||
|
||||
/// Gets the flag value on the underlying number
|
||||
Number::EnforceInteger
|
||||
integerEnforcement() const noexcept;
|
||||
|
||||
/// Checks the underlying number
|
||||
bool
|
||||
valid() const noexcept;
|
||||
|
||||
operator Number() const
|
||||
{
|
||||
return value_;
|
||||
|
||||
Reference in New Issue
Block a user