feat: Upgrade to libxrpl 2.4.0-b1 (#1789)

This commit is contained in:
Alex Kremer
2024-12-18 14:35:16 +00:00
committed by GitHub
parent 017cf2adc9
commit 2d0253bc4a
7 changed files with 22 additions and 12 deletions

View File

@@ -28,7 +28,7 @@ class Clio(ConanFile):
'protobuf/3.21.9',
'grpc/1.50.1',
'openssl/1.1.1u',
'xrpl/2.3.0',
'xrpl/2.4.0-b1',
'zlib/1.3.1',
'libbacktrace/cci.20210118'
]

View File

@@ -80,8 +80,8 @@ getAmmLpHolds(
return getAmmLpHolds(
backend,
sequence,
ammSle[ripple::sfAsset].currency,
ammSle[ripple::sfAsset2].currency,
ammSle[ripple::sfAsset].get<ripple::Issue>().currency,
ammSle[ripple::sfAsset2].get<ripple::Issue>().currency,
ammSle[ripple::sfAccount],
lpAccount,
yield

View File

@@ -27,9 +27,8 @@
#include <boost/json/conversion.hpp>
#include <boost/json/object.hpp>
#include <boost/json/value.hpp>
#include <xrpl/basics/IOUAmount.h>
#include <xrpl/basics/XRPAmount.h>
#include <xrpl/beast/utility/Zero.h>
#include <xrpl/protocol/IOUAmount.h>
#include <xrpl/protocol/Issue.h>
#include <xrpl/protocol/LedgerFormats.h>
#include <xrpl/protocol/LedgerHeader.h>
@@ -38,6 +37,7 @@
#include <xrpl/protocol/STObject.h>
#include <xrpl/protocol/STTx.h>
#include <xrpl/protocol/TxFormats.h>
#include <xrpl/protocol/XRPAmount.h>
#include <xrpl/protocol/jss.h>
#include <algorithm>

View File

@@ -45,7 +45,7 @@
#include <fmt/core.h>
#include <xrpl/basics/Slice.h>
#include <xrpl/basics/StringUtilities.h>
#include <xrpl/basics/XRPAmount.h>
#include <xrpl/protocol/XRPAmount.h>
#include <xrpl/basics/base_uint.h>
#include <xrpl/basics/chrono.h>
#include <xrpl/basics/strHex.h>

View File

@@ -40,7 +40,7 @@
#include <boost/regex/v5/regex_fwd.hpp>
#include <boost/regex/v5/regex_match.hpp>
#include <fmt/core.h>
#include <xrpl/basics/XRPAmount.h>
#include <xrpl/protocol/XRPAmount.h>
#include <xrpl/basics/base_uint.h>
#include <xrpl/json/json_value.h>
#include <xrpl/protocol/AccountID.h>

View File

@@ -145,8 +145,8 @@ AMMInfoHandler::process(AMMInfoHandler::Input input, Context const& ctx) const
// If the issue1 and issue2 are not specified, we need to get them from the AMM.
// Otherwise we preserve the mapping of asset1 -> issue1 and asset2 -> issue2 as requested by the user.
if (issue1 == ripple::noIssue() and issue2 == ripple::noIssue()) {
issue1 = amm[sfAsset];
issue2 = amm[sfAsset2];
issue1 = amm[sfAsset].get<Issue>();
issue2 = amm[sfAsset2].get<Issue>();
}
auto const [asset1Balance, asset2Balance] =
@@ -204,12 +204,22 @@ AMMInfoHandler::process(AMMInfoHandler::Input input, Context const& ctx) const
if (!isXRP(asset1Balance)) {
response.asset1Frozen = isFrozen(
*sharedPtrBackend_, lgrInfo.seq, ammAccountID, amm[sfAsset].currency, amm[sfAsset].account, ctx.yield
*sharedPtrBackend_,
lgrInfo.seq,
ammAccountID,
amm[sfAsset].get<Issue>().currency,
amm[sfAsset].get<Issue>().account,
ctx.yield
);
}
if (!isXRP(asset2Balance)) {
response.asset2Frozen = isFrozen(
*sharedPtrBackend_, lgrInfo.seq, ammAccountID, amm[sfAsset2].currency, amm[sfAsset2].account, ctx.yield
*sharedPtrBackend_,
lgrInfo.seq,
ammAccountID,
amm[sfAsset2].get<Issue>().currency,
amm[sfAsset2].get<Issue>().account,
ctx.yield
);
}

View File

@@ -27,7 +27,7 @@
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include <xrpl/basics/Blob.h>
#include <xrpl/basics/XRPAmount.h>
#include <xrpl/protocol/XRPAmount.h>
#include <xrpl/basics/base_uint.h>
#include <xrpl/protocol/Indexes.h>