jcp-receipt: move an orphaned doc comment onto the test it describes #209
1 changed files with 11 additions and 6 deletions
|
|
@ -878,12 +878,6 @@ mod tests {
|
|||
(allow_f, grant, allow_d, deny_d)
|
||||
}
|
||||
|
||||
/// **The migration guarantee.** These are the REAL bytes published in
|
||||
/// `conformance/v1/vectors.json` before `payload_hash` existed, sealed under
|
||||
/// `jcp/1`. They MUST still verify — version dispatch recomputes the legacy
|
||||
/// preimage — or the bump silently invalidated every receipt in the wild.
|
||||
|
||||
|
||||
/// Absent, the field changes nothing: the same bytes, so every receipt
|
||||
/// sealed before this existed and every published vector still verifies.
|
||||
#[test]
|
||||
|
|
@ -956,6 +950,17 @@ mod tests {
|
|||
assert!(environment_of(&wire).is_none(), "an unparseable id is not a claim");
|
||||
}
|
||||
|
||||
/// **The migration guarantee.** These are the REAL bytes published in
|
||||
/// `conformance/v1/legacy_jcp1.json`, sealed under `jcp/1` before
|
||||
/// `payload_hash` existed. They MUST still verify — version dispatch
|
||||
/// recomputes the legacy preimage — or the bump silently invalidated every
|
||||
/// receipt already in the wild.
|
||||
///
|
||||
/// The constant below is a copy of that file's **allow** envelope, kept so this
|
||||
/// crate's own suite can stand alone. The published file carries an allow *and*
|
||||
/// a deny, and both are verified against the file itself by
|
||||
/// `jcp-conformance`'s `tests/pack.rs` — which is what a third party actually
|
||||
/// downloads, and what should be believed if the two ever disagree.
|
||||
#[test]
|
||||
fn published_v1_receipts_still_verify() {
|
||||
const V1_ALLOW: &str = "d284581fa201270458196469643a6578616d706c653a6a63702d7265666572656e6365a05901d2ae65747275737467636f6e74726f6c66616374696f6e64726561646669737375657278386469643a6b65793a7a364d6b6f6e334e656364364e6b6b79666f476f48786964327a6e476335394c55334b376d756261526346624c664c5867636f73745f756a181e677374657761726478196469643a6578616d706c653a6a63702d7265666572656e6365677375626a65637478386469643a6b65793a7a364d6b6f39685467674d776a535445614a615055664536747163793278765536426e4e713365336f38715642697948677665726469637465616c6c6f77686772616e745f6964784033623161356139636262373831353134636637353162613030376530373765383038333937376234663037623130346433366565393034643932383939386334687265736f75726365784030663766623535636565393361623937373738323936303865383531666133316536386531326462396466633061383032366164323938333134636633663932696275646765745f756a18646a6672616d655f6b696e6469746f6f6c2d63616c6c6b6a63705f72656365697074656a63702f3171656e657267795f70726f76656e616e63656748775368756e74736275646765745f72656d61696e696e675f756a184658405a7be56b33956c069d4e23127baa7b090e5028b9704dff6ca5ac46da546534e667151f80d7d7a605bcc31ea2bb33ec971e3e8b8794f7248a18b34c33bc438509";
|
||||
|
|
|
|||
Loading…
Reference in a new issue