test: manifest sequence continues from a migrated token_sequence

This commit is contained in:
Denis Angell
2026-09-13 19:56:34 -04:00
parent ff5aa537e1
commit 728db41016

View File

@@ -204,6 +204,20 @@ private:
}
}
{
// A key migrated from a publisher whose manifests carried the list
// sequence continues from that sequence.
auto const kp2 = generateKeyPair(KeyType::Ed25519, randomSeed());
auto keys = SigningKeys(KeyType::Ed25519, kp2.second, 2026091301);
auto const token = keys.createValidatorToken(KeyType::Ed25519);
if (BEAST_EXPECT(token))
{
auto const m = deserializeManifest(base64Decode(token->manifest));
BEAST_EXPECT(m && m->sequence == 2026091302);
BEAST_EXPECT(keys.sequence() == 2026091302);
}
}
auto const keyType = KeyType::Ed25519;
auto const kp = generateKeyPair(keyType, randomSeed());