mirror of
https://github.com/Xahau/xahaud.git
synced 2026-10-04 19:08:01 +00:00
test(export): require actual per-origin publication expiry
Closes the catch-up review finding that unwitnessed pending latches could be labeled expired using only submission-based run targets. Require accepted history to pass the latch deadline; equality remains live.
This commit is contained in:
@@ -5134,7 +5134,9 @@ class SteppingExtensions_test : public beast::unit_test::suite
|
||||
<< " witness only on node " << n << std::endl;
|
||||
return false;
|
||||
}
|
||||
auto const ledger = net.ledger(0, net.validSeq(0));
|
||||
// Classify against history accepted by every node, not a faster
|
||||
// node's tip or the intent submission time. Admission can be late.
|
||||
auto const ledger = net.ledger(0, net.minValidatedSeq());
|
||||
if (!ledger)
|
||||
return false;
|
||||
auto const latch =
|
||||
@@ -5147,6 +5149,15 @@ class SteppingExtensions_test : public beast::unit_test::suite
|
||||
<< " neither witnessed nor retained" << std::endl;
|
||||
return false;
|
||||
}
|
||||
if (!latch->isFieldPresent(sfLastLedgerSequence) ||
|
||||
ledger->seq() <= latch->getFieldU32(sfLastLedgerSequence))
|
||||
{
|
||||
log << " seeded-mix red " << schedule << " " << tag
|
||||
<< " unwitnessed origin has not passed its publication "
|
||||
"window"
|
||||
<< std::endl;
|
||||
return false;
|
||||
}
|
||||
log << " seeded-mix " << schedule << " " << tag << "=expired"
|
||||
<< std::endl;
|
||||
return true;
|
||||
|
||||
@@ -822,6 +822,10 @@ class ThreadedExtensions_test : public beast::unit_test::suite
|
||||
<< " expired shape=" << shape << std::endl;
|
||||
if (!latch)
|
||||
return fail("latch missing");
|
||||
if (!latch->isFieldPresent(sfLastLedgerSequence) ||
|
||||
ledger->seq() <= latch->getFieldU32(sfLastLedgerSequence))
|
||||
return fail(
|
||||
"unwitnessed origin has not passed its publication window");
|
||||
if (hasSig)
|
||||
return fail("expired latch has a signature hash");
|
||||
if (hasNode != inDir)
|
||||
|
||||
Reference in New Issue
Block a user