392            env.
app().getNodeFamily());
 
  400                ledger->rawInsert(
sle(x));
 
  405            BEAST_EXPECT(
sles(*ledger) == 
list(1, 2, 3));
 
  406            auto e = ledger->stateMap().end();
 
  407            auto b1 = ledger->stateMap().begin();
 
  408            BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(1)) == e);
 
  409            BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(2)) == b1);
 
  411            BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(3)) == b1);
 
  413            BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(4)) == b1);
 
  414            BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(5)) == b1);
 
  415            b1 = ledger->stateMap().begin();
 
  416            BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(0)) == b1);
 
  418            BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(1)) == b1);
 
  420            BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(2)) == b1);
 
  421            BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(3)) == e);
 
  426            BEAST_EXPECT(
sles(*ledger) == 
list(2, 4, 6));
 
  427            auto e = ledger->stateMap().end();
 
  428            auto b1 = ledger->stateMap().begin();
 
  429            BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(1)) == e);
 
  430            BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(2)) == e);
 
  431            BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(3)) == b1);
 
  432            BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(4)) == b1);
 
  434            BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(5)) == b1);
 
  435            BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(6)) == b1);
 
  437            BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(7)) == b1);
 
  438            b1 = ledger->stateMap().begin();
 
  439            BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(1)) == b1);
 
  441            BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(2)) == b1);
 
  442            BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(3)) == b1);
 
  445            BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(4)) == b1);
 
  446            BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(5)) == b1);
 
  447            BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(6)) == e);
 
  448            BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(7)) == e);
 
  451            setup({2, 3, 5, 6, 10, 15});
 
  452            BEAST_EXPECT(
sles(*ledger) == 
list(2, 3, 5, 6, 10, 15));
 
  453            auto e = ledger->stateMap().end();
 
  454            auto b = ledger->stateMap().begin();
 
  455            BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(1)) == e);
 
  456            BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(2)) == e);
 
  457            BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(3)) == b);
 
  459            BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(4)) == b);
 
  460            BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(5)) == b);
 
  462            BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(6)) == b);
 
  464            BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(7)) == b);
 
  465            BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(8)) == b);
 
  466            BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(9)) == b);
 
  467            BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(10)) == b);
 
  469            BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(11)) == b);
 
  470            BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(12)) == b);
 
  471            BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(13)) == b);
 
  472            BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(14)) == b);
 
  473            BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(15)) == b);
 
  475            BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(16)) == b);
 
  476            b = ledger->stateMap().begin();
 
  477            BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(0)) == b);
 
  478            BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(1)) == b);
 
  480            BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(2)) == b);
 
  482            BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(3)) == b);
 
  483            BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(4)) == b);
 
  485            BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(5)) == b);
 
  487            BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(6)) == b);
 
  488            BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(7)) == b);
 
  489            BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(8)) == b);
 
  490            BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(9)) == b);
 
  492            BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(10)) == b);
 
  493            BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(11)) == b);
 
  494            BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(12)) == b);
 
  495            BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(13)) == b);
 
  496            BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(14)) == b);
 
  498            BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(15)) == e);
 
  499            BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(16)) == e);
 
  503            setup({0,  1,  2,  3,  4,  5,  6,  7,  8,  9,  10, 11, 12,
 
  504                   13, 14, 15, 16, 20, 25, 30, 32, 33, 34, 35, 36, 37,
 
  505                   38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 66, 100});
 
  548            auto b = ledger->stateMap().begin();
 
  549            auto e = ledger->stateMap().end();
 
  550            BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(0)) == e);
 
  551            BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(1)) == b);
 
  553                ledger->stateMap().lower_bound(
uint256(5))->key() ==
 
  556                ledger->stateMap().lower_bound(
uint256(15))->key() ==
 
  559                ledger->stateMap().lower_bound(
uint256(16))->key() ==
 
  562                ledger->stateMap().lower_bound(
uint256(19))->key() ==
 
  565                ledger->stateMap().lower_bound(
uint256(20))->key() ==
 
  568                ledger->stateMap().lower_bound(
uint256(24))->key() ==
 
  571                ledger->stateMap().lower_bound(
uint256(31))->key() ==
 
  574                ledger->stateMap().lower_bound(
uint256(32))->key() ==
 
  577                ledger->stateMap().lower_bound(
uint256(40))->key() ==
 
  580                ledger->stateMap().lower_bound(
uint256(47))->key() ==
 
  583                ledger->stateMap().lower_bound(
uint256(48))->key() ==
 
  586                ledger->stateMap().lower_bound(
uint256(64))->key() ==
 
  590                ledger->stateMap().lower_bound(
uint256(90))->key() ==
 
  593                ledger->stateMap().lower_bound(
uint256(96))->key() ==
 
  596                ledger->stateMap().lower_bound(
uint256(100))->key() ==
 
  600                ledger->stateMap().upper_bound(
uint256(0))->key() ==
 
  603                ledger->stateMap().upper_bound(
uint256(5))->key() ==
 
  606                ledger->stateMap().upper_bound(
uint256(15))->key() ==
 
  609                ledger->stateMap().upper_bound(
uint256(16))->key() ==
 
  612                ledger->stateMap().upper_bound(
uint256(18))->key() ==
 
  615                ledger->stateMap().upper_bound(
uint256(20))->key() ==
 
  618                ledger->stateMap().upper_bound(
uint256(31))->key() ==
 
  621                ledger->stateMap().upper_bound(
uint256(32))->key() ==
 
  624                ledger->stateMap().upper_bound(
uint256(47))->key() ==
 
  627                ledger->stateMap().upper_bound(
uint256(48))->key() ==
 
  630                ledger->stateMap().upper_bound(
uint256(53))->key() ==
 
  633                ledger->stateMap().upper_bound(
uint256(66))->key() ==
 
  636                ledger->stateMap().upper_bound(
uint256(70))->key() ==
 
  639                ledger->stateMap().upper_bound(
uint256(85))->key() ==
 
  642                ledger->stateMap().upper_bound(
uint256(98))->key() ==
 
  644            BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(100)) == e);
 
  645            BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(155)) == e);
 
 
  983        auto const alice = 
Account(
"alice");
 
  984        auto const bob = 
Account(
"bob");
 
  991        auto const rdViewA3 = eA.
closed();
 
  995        auto const rdViewA4 = eA.
closed();
 
 1005        auto const rdViewB3 = eB.closed();
 
 1007        eB.fund(
XRP(10000), alice);
 
 1009        auto const rdViewB4 = eB.closed();
 
 1013        BEAST_EXPECT(
areCompatible(*rdViewA3, *rdViewA4, jStream, 
""));
 
 1014        BEAST_EXPECT(
areCompatible(*rdViewA4, *rdViewA3, jStream, 
""));
 
 1015        BEAST_EXPECT(
areCompatible(*rdViewA4, *rdViewA4, jStream, 
""));
 
 1016        BEAST_EXPECT(!
areCompatible(*rdViewA3, *rdViewB4, jStream, 
""));
 
 1017        BEAST_EXPECT(!
areCompatible(*rdViewA4, *rdViewB3, jStream, 
""));
 
 1018        BEAST_EXPECT(!
areCompatible(*rdViewA4, *rdViewB4, jStream, 
""));
 
 1022        auto const& iA3 = rdViewA3->info();
 
 1023        auto const& iA4 = rdViewA4->info();
 
 1025        BEAST_EXPECT(
areCompatible(iA3.hash, iA3.seq, *rdViewA4, jStream, 
""));
 
 1026        BEAST_EXPECT(
areCompatible(iA4.hash, iA4.seq, *rdViewA3, jStream, 
""));
 
 1027        BEAST_EXPECT(
areCompatible(iA4.hash, iA4.seq, *rdViewA4, jStream, 
""));
 
 1028        BEAST_EXPECT(!
areCompatible(iA3.hash, iA3.seq, *rdViewB4, jStream, 
""));
 
 1029        BEAST_EXPECT(
areCompatible(iA4.hash, iA4.seq, *rdViewB3, jStream, 
""));
 
 1030        BEAST_EXPECT(!
areCompatible(iA4.hash, iA4.seq, *rdViewB4, jStream, 
""));