Merge branch 'ripple/wasmi' into wasmi-host-functions

This commit is contained in:
Mayukha Vadari
2026-01-08 11:43:01 -05:00
25 changed files with 180 additions and 143 deletions

View File

@@ -402,6 +402,38 @@ class Batch_test : public beast::unit_test::suite
env.close();
}
// temBAD_FEE: Inner txn with negative fee
{
auto const seq = env.seq(alice);
auto const batchFee = batch::calcBatchFee(env, 0, 2);
auto tx1 = batch::inner(pay(alice, bob, XRP(1)), seq + 1);
tx1[jss::Fee] = "-1";
env(batch::outer(alice, seq, batchFee, tfAllOrNothing),
tx1,
batch::inner(pay(alice, bob, XRP(2)), seq + 2),
ter(temBAD_FEE));
env.close();
}
// temBAD_FEE: Inner txn with non-integer fee
{
auto const seq = env.seq(alice);
auto const batchFee = batch::calcBatchFee(env, 0, 2);
auto tx1 = batch::inner(pay(alice, bob, XRP(1)), seq + 1);
tx1[jss::Fee] = "1.5";
try
{
env(batch::outer(alice, seq, batchFee, tfAllOrNothing),
tx1,
batch::inner(pay(alice, bob, XRP(2)), seq + 2));
fail("Expected parse_error for fractional fee");
}
catch (jtx::parse_error const&)
{
BEAST_EXPECT(true);
}
}
// temSEQ_AND_TICKET: Batch: inner txn cannot have both Sequence
// and TicketSequence.
{

View File

@@ -2370,7 +2370,8 @@ private:
&extractHeader](Message& message) {
auto [header, buffers] = extractHeader(message);
if (BEAST_EXPECT(header) &&
BEAST_EXPECT(header->message_type == protocol::mtVALIDATORLIST))
BEAST_EXPECT(
header->message_type == protocol::mtVALIDATOR_LIST))
{
auto const msg =
detail::parseMessageContent<protocol::TMValidatorList>(
@@ -2386,7 +2387,7 @@ private:
if (BEAST_EXPECT(header) &&
BEAST_EXPECT(
header->message_type ==
protocol::mtVALIDATORLISTCOLLECTION))
protocol::mtVALIDATOR_LIST_COLLECTION))
{
auto const msg = detail::parseMessageContent<
protocol::TMValidatorListCollection>(

View File

@@ -436,12 +436,12 @@ public:
// 895B
doTest(
buildValidatorList(),
protocol::mtVALIDATORLIST,
protocol::mtVALIDATOR_LIST,
4,
"TMValidatorList");
doTest(
buildValidatorListCollection(),
protocol::mtVALIDATORLISTCOLLECTION,
protocol::mtVALIDATOR_LIST_COLLECTION,
4,
"TMValidatorListCollection");
}