From 3bbdc19469e9a7675bc5505df3162b6f6934e2fb Mon Sep 17 00:00:00 2001 From: Alex Kremer Date: Tue, 17 Dec 2024 14:27:52 +0000 Subject: [PATCH] Upgrade to libxrpl 2.4.0-b1 --- conanfile.py | 2 +- src/rpc/AMMHelpers.cpp | 4 ++-- src/rpc/BookChangesHelper.hpp | 4 ++-- src/rpc/RPCHelpers.cpp | 2 +- src/rpc/RPCHelpers.hpp | 2 +- src/rpc/handlers/AMMInfo.cpp | 18 ++++++++++++++---- tests/unit/data/BackendInterfaceTests.cpp | 2 +- 7 files changed, 22 insertions(+), 12 deletions(-) diff --git a/conanfile.py b/conanfile.py index 3e56067d0..997dee1c4 100644 --- a/conanfile.py +++ b/conanfile.py @@ -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' ] diff --git a/src/rpc/AMMHelpers.cpp b/src/rpc/AMMHelpers.cpp index 7958efefd..2635530db 100644 --- a/src/rpc/AMMHelpers.cpp +++ b/src/rpc/AMMHelpers.cpp @@ -80,8 +80,8 @@ getAmmLpHolds( return getAmmLpHolds( backend, sequence, - ammSle[ripple::sfAsset].currency, - ammSle[ripple::sfAsset2].currency, + ammSle[ripple::sfAsset].get().currency, + ammSle[ripple::sfAsset2].get().currency, ammSle[ripple::sfAccount], lpAccount, yield diff --git a/src/rpc/BookChangesHelper.hpp b/src/rpc/BookChangesHelper.hpp index d0aefc24f..a766a25a8 100644 --- a/src/rpc/BookChangesHelper.hpp +++ b/src/rpc/BookChangesHelper.hpp @@ -27,9 +27,8 @@ #include #include #include -#include -#include #include +#include #include #include #include @@ -38,6 +37,7 @@ #include #include #include +#include #include #include diff --git a/src/rpc/RPCHelpers.cpp b/src/rpc/RPCHelpers.cpp index 99d3bd610..08bba9110 100644 --- a/src/rpc/RPCHelpers.cpp +++ b/src/rpc/RPCHelpers.cpp @@ -45,7 +45,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/rpc/RPCHelpers.hpp b/src/rpc/RPCHelpers.hpp index 1ffd52cb8..6a4c00f96 100644 --- a/src/rpc/RPCHelpers.hpp +++ b/src/rpc/RPCHelpers.hpp @@ -40,7 +40,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/rpc/handlers/AMMInfo.cpp b/src/rpc/handlers/AMMInfo.cpp index 60d20f12d..872d94ddc 100644 --- a/src/rpc/handlers/AMMInfo.cpp +++ b/src/rpc/handlers/AMMInfo.cpp @@ -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(); + issue2 = amm[sfAsset2].get(); } 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().currency, + amm[sfAsset].get().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().currency, + amm[sfAsset2].get().account, + ctx.yield ); } diff --git a/tests/unit/data/BackendInterfaceTests.cpp b/tests/unit/data/BackendInterfaceTests.cpp index c009d5f17..dfbdfd4cc 100644 --- a/tests/unit/data/BackendInterfaceTests.cpp +++ b/tests/unit/data/BackendInterfaceTests.cpp @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include