From 76512ad895a997067e68504fb08c7290d03534d5 Mon Sep 17 00:00:00 2001 From: Shawn Xie Date: Mon, 27 May 2024 13:06:14 -0400 Subject: [PATCH] set 100B max to MPT --- src/ripple/protocol/Protocol.h | 2 +- src/test/app/MPToken_test.cpp | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/ripple/protocol/Protocol.h b/src/ripple/protocol/Protocol.h index 80fd05c1223..f0a491b3a97 100644 --- a/src/ripple/protocol/Protocol.h +++ b/src/ripple/protocol/Protocol.h @@ -99,7 +99,7 @@ std::size_t constexpr maxDomainLength = 256; std::size_t constexpr maxMPTokenMetadataLength = 1024; /** The maximum amount of MPTokenIssuance */ -std::uint64_t constexpr maxMPTokenAmount = 0x7FFFFFFFFFFFFFFFull; +std::uint64_t constexpr maxMPTokenAmount = 100000000000000000ull; /** A ledger index. */ using LedgerIndex = std::uint32_t; diff --git a/src/test/app/MPToken_test.cpp b/src/test/app/MPToken_test.cpp index f47638ab083..45278454fc0 100644 --- a/src/test/app/MPToken_test.cpp +++ b/src/test/app/MPToken_test.cpp @@ -107,7 +107,7 @@ class MPToken_test : public beast::unit_test::suite Env env{*this, features}; MPTTester mptAlice(env, alice); mptAlice.create( - {.maxAmt = 0x7FFFFFFFFFFFFFFF, + {.maxAmt = 100000000000000000ull, .assetScale = 1, .transferFee = 10, .metadata = "123", @@ -770,21 +770,21 @@ class MPToken_test : public beast::unit_test::suite // the range // Issuer fails trying to send more than the default maximum // amount allowed - // { - // Env env{*this, features}; + { + Env env{*this, features}; - // MPTTester mptAlice(env, alice, {.holders = {&bob}}); + MPTTester mptAlice(env, alice, {.holders = {&bob}}); - // mptAlice.create({.ownerCount = 1, .holderCount = 0}); + mptAlice.create({.ownerCount = 1, .holderCount = 0}); - // mptAlice.authorize({.account = &bob}); + mptAlice.authorize({.account = &bob}); - // // issuer sends holder the default max amount allowed - // mptAlice.pay(alice, bob, maxMPTokenAmount); + // issuer sends holder the default max amount allowed + mptAlice.pay(alice, bob, maxMPTokenAmount); - // // issuer tries to exceed max amount - // mptAlice.pay(alice, bob, 1, tecMPT_MAX_AMOUNT_EXCEEDED); - // } + // issuer tries to exceed max amount + mptAlice.pay(alice, bob, 1, tecMPT_MAX_AMOUNT_EXCEEDED); + } // Transfer fee {