Skip to content

Commit 457e67c

Browse files
authored
Merge branch 'dev' into build-xahau-h
2 parents 1beedcd + 8cfee6c commit 457e67c

File tree

23 files changed

+2485
-683
lines changed

23 files changed

+2485
-683
lines changed

include/xrpl/protocol/IOUAmount.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,12 @@ class IOUAmount : private boost::totally_ordered<IOUAmount>,
9797

9898
static IOUAmount
9999
minPositiveAmount();
100+
101+
friend std::ostream&
102+
operator<<(std::ostream& os, IOUAmount const& x)
103+
{
104+
return os << to_string(x);
105+
}
100106
};
101107

102108
inline IOUAmount::IOUAmount(beast::Zero)

include/xrpl/protocol/Rules.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@
2828

2929
namespace ripple {
3030

31+
bool
32+
isFeatureEnabled(uint256 const& feature);
33+
3134
class DigestAwareReadView;
3235

3336
/** Rules controlling protocol behavior. */

src/libxrpl/protocol/Rules.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,4 +153,12 @@ Rules::operator!=(Rules const& other) const
153153
{
154154
return !(*this == other);
155155
}
156+
157+
bool
158+
isFeatureEnabled(uint256 const& feature)
159+
{
160+
auto const& rules = getCurrentTransactionRules();
161+
return rules && rules->enabled(feature);
162+
}
163+
156164
} // namespace ripple

src/test/app/AMMClawback_test.cpp

Lines changed: 504 additions & 189 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)