mirror of
https://github.com/XRPLF/rippled.git
synced 2026-08-21 06:10:58 +00:00
Merge branch 'ripple/wasmi' into wasmi-host-functions
This commit is contained in:
@@ -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.
|
||||
{
|
||||
|
||||
@@ -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>(
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user