mirror of
https://github.com/XRPLF/rippled.git
synced 2026-08-22 23:00:55 +00:00
refactor: Use SeqProxy instead of uint32 for all sequence-based keylets (#7890)
Co-authored-by: xrplf-ai-reviewer[bot] <266832837+xrplf-ai-reviewer[bot]@users.noreply.github.com>
This commit is contained in:
@@ -38,6 +38,7 @@
|
||||
#include <xrpl/protocol/SField.h>
|
||||
#include <xrpl/protocol/STAmount.h>
|
||||
#include <xrpl/protocol/Seed.h>
|
||||
#include <xrpl/protocol/SeqProxy.h>
|
||||
#include <xrpl/protocol/TER.h>
|
||||
#include <xrpl/protocol/TxFlags.h>
|
||||
#include <xrpl/protocol/UintTypes.h>
|
||||
@@ -797,13 +798,15 @@ public:
|
||||
// The offer expires (it's not removed yet).
|
||||
env.close();
|
||||
env.require(Owners(bob, 1), offers(bob, 1));
|
||||
auto const expiredBobOffer = keylet::offer(bob, env.seq(bob) - 1);
|
||||
auto const expiredBobOffer =
|
||||
keylet::offer(bob, SeqProxy::rawSequence(env.seq(bob) - 1));
|
||||
|
||||
// bob creates the offer that will be crossed.
|
||||
env(offer(bob, usd(500), XRP(500)), Ter(tesSUCCESS));
|
||||
env.close();
|
||||
env.require(Owners(bob, 2), offers(bob, 2));
|
||||
auto const crossedBobOffer = keylet::offer(bob, env.seq(bob) - 1);
|
||||
auto const crossedBobOffer =
|
||||
keylet::offer(bob, SeqProxy::rawSequence(env.seq(bob) - 1));
|
||||
|
||||
env(trust(alice, usd(1000)), Ter(tesSUCCESS));
|
||||
env(pay(gw, alice, usd(1000)), Ter(tesSUCCESS));
|
||||
@@ -850,7 +853,7 @@ public:
|
||||
|
||||
env(offer(bob, usd(500), XRP(500)), Ter(tesSUCCESS));
|
||||
env.close();
|
||||
auto const bobOffer = keylet::offer(bob, env.seq(bob) - 1);
|
||||
auto const bobOffer = keylet::offer(bob, SeqProxy::rawSequence(env.seq(bob) - 1));
|
||||
|
||||
env(trust(alice, usd(1000)), Ter(tesSUCCESS));
|
||||
env(pay(gw, alice, usd(1000)), Ter(tesSUCCESS));
|
||||
|
||||
Reference in New Issue
Block a user