@@ -185,7 +185,7 @@ mod tests {
185
185
Commitment :: eq ( & data_comm, & read_data_comm)
186
186
} ;
187
187
188
- let ( data_updated, update_consistency) = {
188
+ let ( data_updated, update_consistency, diff_comm_consistency ) = {
189
189
let diff = {
190
190
// The number of updates is proportional to the data length,
191
191
// but we make sure to have at least one update if the data is
@@ -216,11 +216,15 @@ mod tests {
216
216
let updated_read_data = storage:: read ( path) . unwrap ( ) ;
217
217
let updated_read_data_comm = updated_read_data. to_commitment ( & srs) ;
218
218
219
+ let updated_diff_data_comm = data_comm. update ( & srs, diff) ;
220
+
219
221
(
220
222
// True if the data have changed because of the update
221
223
Commitment :: ne ( & updated_data_comm, & data_comm) ,
222
224
// True if read data from updated file are the same as updated data
223
225
Commitment :: eq ( & updated_data_comm, & updated_read_data_comm) ,
226
+ // True if the commitments are the same as the commitment obtained by direct diff application
227
+ Commitment :: eq ( & updated_diff_data_comm, & updated_data_comm) ,
224
228
)
225
229
} ;
226
230
@@ -229,5 +233,6 @@ mod tests {
229
233
assert ! ( read_consistency) ;
230
234
assert ! ( data_updated) ;
231
235
assert ! ( update_consistency) ;
236
+ assert ! ( diff_comm_consistency) ;
232
237
}
233
238
}
0 commit comments