Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
1165f63
bump to protocol v10
MonsieurNicolas Nov 27, 2017
03174c9
added "exists" method to testAccount
MonsieurNicolas Jan 30, 2018
44bd9e7
removed obsolete calls to setCurrentLedgerVersion in txEnvelopeTests
MonsieurNicolas Jan 30, 2018
534caf7
move tests for bound checking into their own sections
MonsieurNicolas Jan 30, 2018
10179d6
Move to new meta format
MonsieurNicolas Jan 30, 2018
69dda2e
Process sequence number during apply
MonsieurNicolas Jan 30, 2018
f879d41
reworked herder test to be a bit more representative of what is going on
MonsieurNicolas Jan 30, 2018
2e67acb
reworked logic for testing transactions (applyCheck)
MonsieurNicolas Jan 30, 2018
e82be46
Add the BumpSequence Operation & Tests
JeremyRubin Sep 22, 2017
7e5e2a0
Fix to make BumpSequence target the source
JeremyRubin Sep 22, 2017
805c759
small refactors, load account instead of direct access
JeremyRubin Sep 23, 2017
7506448
Refactor to use native tx_NOACCOUNT error
JeremyRubin Sep 25, 2017
d2d7871
updated Visual Studio project with BumpSeq files
MonsieurNicolas Mar 20, 2018
cbd8d6f
clang-format & renamed BUMP_SEQ -> BUMP_SEQUENCE
MonsieurNicolas Feb 1, 2018
e5a7110
updated BumpSequence to be compliant with specification dated 13-Oct-…
MonsieurNicolas Feb 1, 2018
7a15050
introduce opNOT_SUPPORTED when operations are not supported (yet/anym…
MonsieurNicolas Feb 3, 2018
e9ed4c5
remove BUMP_SEQUENCE_NOT_SUPPORTED_YET, use operation level failure i…
MonsieurNicolas Feb 3, 2018
1f05651
added safeConvertToSigned utility function
MonsieurNicolas Feb 5, 2018
1082eb0
make it safe for sequence numbers to use the entire uint64 space
MonsieurNicolas Feb 5, 2018
4fe0945
update BumpSequence to allow bumping through the entire uint64 space
MonsieurNicolas Feb 5, 2018
6257cb2
make AccountMerge fail when the current sequence number is too far
MonsieurNicolas Feb 5, 2018
474ece9
added tests for sequence number overflow
MonsieurNicolas Feb 5, 2018
d7a12fd
added missing merge test (signers)
MonsieurNicolas Feb 6, 2018
f9f9187
make SequenceNumber a signed integer (BumpSeq proposal 08-Feb-2018)
MonsieurNicolas Feb 9, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
move tests for bound checking into their own sections
  • Loading branch information
MonsieurNicolas committed Mar 20, 2018
commit 534caf7e00d28b4c459ee78da5cff3ee4ce24d1c
55 changes: 32 additions & 23 deletions src/transactions/TxEnvelopeTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -982,33 +982,42 @@ TEST_CASE("txenvelope", "[tx][envelope]")

clock.setCurrentTime(ledgerTime);

txFrame =
root.tx({payment(a1.getPublicKey(), paymentAmount)});
txFrame->getEnvelope().tx.timeBounds.activate() =
TimeBounds(start + 1000, start + 10000);

closeLedgerOn(*app, 3, 1, 7, 2014);
applyCheck(txFrame, *app);

REQUIRE(txFrame->getResultCode() == txTOO_EARLY);
SECTION("too early")
{
txFrame = root.tx(
{payment(a1.getPublicKey(), paymentAmount)});
txFrame->getEnvelope().tx.timeBounds.activate() =
TimeBounds(start + 1000, start + 10000);

txFrame =
root.tx({payment(a1.getPublicKey(), paymentAmount)});
txFrame->getEnvelope().tx.timeBounds.activate() =
TimeBounds(1000, start + 300000);
closeLedgerOn(*app, 3, 1, 7, 2014);
applyCheck(txFrame, *app);

closeLedgerOn(*app, 4, 2, 7, 2014);
applyCheck(txFrame, *app);
REQUIRE(txFrame->getResultCode() == txSUCCESS);
REQUIRE(txFrame->getResultCode() == txTOO_EARLY);
}

txFrame =
root.tx({payment(a1.getPublicKey(), paymentAmount)});
txFrame->getEnvelope().tx.timeBounds.activate() =
TimeBounds(1000, start);
SECTION("on time")
{
txFrame = root.tx(
{payment(a1.getPublicKey(), paymentAmount)});
txFrame->getEnvelope().tx.timeBounds.activate() =
TimeBounds(1000, start + 300000);

closeLedgerOn(*app, 3, 2, 7, 2014);
applyCheck(txFrame, *app);
REQUIRE(txFrame->getResultCode() == txSUCCESS);
}

closeLedgerOn(*app, 5, 3, 7, 2014);
applyCheck(txFrame, *app);
REQUIRE(txFrame->getResultCode() == txTOO_LATE);
SECTION("too late")
{
txFrame = root.tx(
{payment(a1.getPublicKey(), paymentAmount)});
txFrame->getEnvelope().tx.timeBounds.activate() =
TimeBounds(1000, start);

closeLedgerOn(*app, 3, 3, 7, 2014);
applyCheck(txFrame, *app);
REQUIRE(txFrame->getResultCode() == txTOO_LATE);
}
});
}

Expand Down