File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -110,23 +110,19 @@ def verify_hash(self) -> None:
110110 self .data_content_type ,
111111 ])
112112
113+ print ("########### Metadata: " , metadata )
114+
113115 metadata_bytes = metadata .encode ("utf-8" )
114116 data_bytes = json .dumps (self .data ).encode ("utf-8" )
115117
116118 metadata_hash = sha256 (metadata_bytes ).hexdigest ()
117119 data_hash = sha256 (data_bytes ).hexdigest ()
118120
119- print ("########### Metadata hash: " , metadata_hash )
120- print ("########### Data hash: " , data_hash )
121-
122121 final_hash = sha256 ()
123122 final_hash .update (metadata_hash .encode ("utf-8" ))
124123 final_hash .update (data_hash .encode ("utf-8" ))
125124 final_hash_hex = final_hash .hexdigest ()
126125
127- print ("########### Final hash: " , final_hash_hex )
128- print ("########### Event hash: " , self .hash )
129-
130126 if final_hash_hex != self .hash :
131127 raise ValidationError ("Failed to verify hash." )
132128
You can’t perform that action at this time.
0 commit comments