File tree Expand file tree Collapse file tree 5 files changed +13
-17
lines changed
mithril-test-lab/mithril-end-to-end/src/Mithril Expand file tree Collapse file tree 5 files changed +13
-17
lines changed Original file line number Diff line number Diff line change @@ -202,7 +202,6 @@ mod handlers {
202202 let digest = message. clone ( ) ;
203203 let certificate_hash = message;
204204 let previous_hash = "" . to_string ( ) ;
205- let block = beacon. immutable_file_number ;
206205 let timestamp: DateTime < Utc > = Utc :: now ( ) ;
207206 let started_at = format ! ( "{:?}" , timestamp) ;
208207 let completed_at = started_at. clone ( ) ;
@@ -228,7 +227,7 @@ mod handlers {
228227 let certificate = entities:: Certificate :: new (
229228 certificate_hash,
230229 previous_hash,
231- block ,
230+ beacon ,
232231 protocol_parameters,
233232 digest,
234233 started_at,
Original file line number Diff line number Diff line change @@ -80,9 +80,9 @@ pub struct Certificate {
8080 #[ serde( rename = "previous_hash" ) ]
8181 pub previous_hash : String ,
8282
83- /// Cardano chain block number
84- #[ serde( rename = "block " ) ]
85- pub block : u64 ,
83+ /// Cardano chain beacon
84+ #[ serde( rename = "beacon " ) ]
85+ pub beacon : Beacon ,
8686
8787 /// Protocol parameters
8888 #[ serde( rename = "protocol" ) ]
@@ -115,7 +115,7 @@ impl Certificate {
115115 pub fn new (
116116 hash : String ,
117117 previous_hash : String ,
118- block : u64 ,
118+ beacon : Beacon ,
119119 protocol_parameters : ProtocolParameters ,
120120 digest : String ,
121121 started_at : String ,
@@ -126,7 +126,7 @@ impl Certificate {
126126 Certificate {
127127 hash,
128128 previous_hash,
129- block ,
129+ beacon ,
130130 protocol_parameters,
131131 digest,
132132 started_at,
Original file line number Diff line number Diff line change @@ -66,15 +66,14 @@ pub fn certificate(certificate_hash: String) -> entities::Certificate {
6666
6767 // Certificate
6868 let previous_hash = format ! ( "{}0" , certificate_hash) ;
69- let block = beacon. immutable_file_number ;
70- let digest = format ! ( "1{}" , block) . repeat ( 20 ) ;
69+ let digest = format ! ( "1{}" , beacon. immutable_file_number) . repeat ( 20 ) ;
7170 let started_at = "2006-01-02T15:04:05Z" . to_string ( ) ;
7271 let completed_at = "2006-01-02T15:04:05Z" . to_string ( ) ;
73- let multisignature = format ! ( "ABC{}" , block ) . repeat ( 200 ) ;
72+ let multisignature = format ! ( "ABC{}" , beacon . immutable_file_number ) . repeat ( 200 ) ;
7473 entities:: Certificate :: new (
7574 certificate_hash,
7675 previous_hash,
77- block ,
76+ beacon ,
7877 protocol_parameters,
7978 digest,
8079 started_at,
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ data SignerWithStake = SignerWithStake
3333data Certificate = Certificate
3434 { hash :: Text ,
3535 previous_hash :: Text ,
36- block :: Word64 ,
36+ beacon :: Beacon ,
3737 protocol :: ProtocolParameters ,
3838 digest :: Text ,
3939 started_at :: UTCTime ,
Original file line number Diff line number Diff line change @@ -318,7 +318,7 @@ components:
318318 required :
319319 - hash
320320 - previous_hash
321- - block
321+ - beacon
322322 - protocol
323323 - digest
324324 - started_at
@@ -334,10 +334,8 @@ components:
334334 description : Hash of the previous certificate
335335 type : string
336336 format : bytes
337- block :
338- description : Cardano chain block number
339- type : integer
340- format : int64
337+ beacon :
338+ $ref : " #/components/schemas/Beacon"
341339 protocol :
342340 description : Protocol parameters
343341 $ref : " #/components/schemas/ProtocolParameters"
You can’t perform that action at this time.
0 commit comments