@@ -25,7 +25,7 @@ use mtc_api::{
2525use serde:: { Deserialize , Serialize } ;
2626use serde_with:: { base64:: Base64 , serde_as} ;
2727use signed_note:: VerifierList ;
28- use std:: time:: Duration ;
28+ use std:: { collections :: VecDeque , time:: Duration } ;
2929use tlog_tiles:: {
3030 open_checkpoint, CheckpointSigner , CheckpointText , LeafIndex , PendingLogEntry ,
3131 PendingLogEntryBlob ,
@@ -74,17 +74,16 @@ pub struct GetCertificateResponse {
7474
7575/// GET response structure for the `/get-landmark-bundle` endpoint
7676#[ serde_as]
77- #[ derive( Serialize , Deserialize ) ]
77+ #[ derive( Serialize ) ]
7878pub struct GetLandmarkBundleResponse < ' a > {
7979 pub checkpoint : & ' a str ,
8080 pub subtrees : Vec < SubtreeWithConsistencyProof > ,
81+ pub landmarks : & ' a VecDeque < u64 > ,
8182}
8283
8384#[ serde_as]
8485#[ derive( Serialize , Deserialize ) ]
8586pub struct SubtreeWithConsistencyProof {
86- pub start : u64 ,
87- pub end : u64 ,
8887 #[ serde_as( as = "Base64" ) ]
8988 pub hash : [ u8 ; 32 ] ,
9089 #[ serde_as( as = "Vec<Base64>" ) ]
@@ -438,8 +437,6 @@ async fn get_landmark_bundle(env: &Env, name: &str) -> Result<Response> {
438437 } ;
439438
440439 subtrees. push ( SubtreeWithConsistencyProof {
441- start : landmark_subtree. lo ( ) ,
442- end : landmark_subtree. hi ( ) ,
443440 hash : landmark_subtree_hash. 0 ,
444441 consistency_proof : consistency_proof. iter ( ) . map ( |h| h. 0 ) . collect ( ) ,
445442 } ) ;
@@ -448,6 +445,7 @@ async fn get_landmark_bundle(env: &Env, name: &str) -> Result<Response> {
448445 Response :: from_json ( & GetLandmarkBundleResponse {
449446 checkpoint : std:: str:: from_utf8 ( & checkpoint_bytes) . unwrap ( ) ,
450447 subtrees,
448+ landmarks : & landmark_sequence. landmarks ,
451449 } )
452450}
453451
0 commit comments