@@ -48,7 +48,7 @@ async fn classic_collection_view_check() -> Result<()> {
4848 let nmax: u8 = 25 ;
4949 for _ in 0 ..n {
5050 let mut view = CollectionStateView :: load ( context. clone ( ) ) . await ?;
51- let hash = view. crypto_hash ( ) . await ?;
51+ let hash = view. crypto_hash_mut ( ) . await ?;
5252 let save = rng. gen :: < bool > ( ) ;
5353 //
5454 let count_oper = rng. gen_range ( 0 ..25 ) ;
@@ -102,7 +102,7 @@ async fn classic_collection_view_check() -> Result<()> {
102102 new_map = map. clone ( ) ;
103103 }
104104 // Checking the hash
105- let new_hash = view. crypto_hash ( ) . await ?;
105+ let new_hash = view. crypto_hash_mut ( ) . await ?;
106106 if map == new_map {
107107 assert_eq ! ( new_hash, hash) ;
108108 } else {
@@ -262,7 +262,7 @@ async fn run_map_view_mutability<R: RngCore + Clone>(rng: &mut R) -> Result<()>
262262 let mut view = ByteMapStateView :: load ( context. clone ( ) ) . await ?;
263263 let save = rng. gen :: < bool > ( ) ;
264264 let read_state = view. map . key_values ( ) . await ?;
265- let read_hash = view. crypto_hash ( ) . await ?;
265+ let read_hash = view. crypto_hash_mut ( ) . await ?;
266266 let state_vec = state_map. clone ( ) . into_iter ( ) . collect :: < Vec < _ > > ( ) ;
267267 assert_eq ! ( state_vec, read_state) ;
268268 //
@@ -351,7 +351,7 @@ async fn run_map_view_mutability<R: RngCore + Clone>(rng: &mut R) -> Result<()>
351351 new_state_map. insert ( key, new_value) ;
352352 }
353353 new_state_vec = new_state_map. clone ( ) . into_iter ( ) . collect ( ) ;
354- let new_hash = view. crypto_hash ( ) . await ?;
354+ let new_hash = view. crypto_hash_mut ( ) . await ?;
355355 if state_vec == new_state_vec {
356356 assert_eq ! ( new_hash, read_hash) ;
357357 } else {
@@ -415,7 +415,7 @@ async fn bucket_queue_view_mutability_check() -> Result<()> {
415415 let n = 200 ;
416416 for _ in 0 ..n {
417417 let mut view = BucketQueueStateView :: load ( context. clone ( ) ) . await ?;
418- let hash = view. crypto_hash ( ) . await ?;
418+ let hash = view. crypto_hash_mut ( ) . await ?;
419419 let save = rng. gen :: < bool > ( ) ;
420420 let elements = view. queue . elements ( ) . await ?;
421421 assert_eq ! ( elements, vector) ;
@@ -469,7 +469,7 @@ async fn bucket_queue_view_mutability_check() -> Result<()> {
469469 new_vector. clone_from ( & vector) ;
470470 }
471471 let new_elements = view. queue . elements ( ) . await ?;
472- let new_hash = view. crypto_hash ( ) . await ?;
472+ let new_hash = view. crypto_hash_mut ( ) . await ?;
473473 if elements == new_elements {
474474 assert_eq ! ( new_hash, hash) ;
475475 } else {
@@ -557,7 +557,7 @@ async fn nested_collection_map_view_check() -> Result<()> {
557557 let n = 20 ;
558558 for _ in 0 ..n {
559559 let mut view = NestedCollectionMapView :: load ( context. clone ( ) ) . await ?;
560- let hash = view. crypto_hash ( ) . await ?;
560+ let hash = view. crypto_hash_mut ( ) . await ?;
561561 let save = rng. gen :: < bool > ( ) ;
562562
563563 let count_oper = rng. gen_range ( 0 ..25 ) ;
@@ -614,7 +614,7 @@ async fn nested_collection_map_view_check() -> Result<()> {
614614 state_view, new_state_map,
615615 "state_view should match new_state_map"
616616 ) ;
617- let new_hash = view. crypto_hash ( ) . await ?;
617+ let new_hash = view. crypto_hash_mut ( ) . await ?;
618618 if state_map == new_state_map {
619619 assert_eq ! ( new_hash, hash) ;
620620 } else {
@@ -653,7 +653,7 @@ async fn queue_view_mutability_check() -> Result<()> {
653653 let n = 20 ;
654654 for _ in 0 ..n {
655655 let mut view = QueueStateView :: load ( context. clone ( ) ) . await ?;
656- let hash = view. crypto_hash ( ) . await ?;
656+ let hash = view. crypto_hash_mut ( ) . await ?;
657657 let save = rng. gen :: < bool > ( ) ;
658658 let elements = view. queue . elements ( ) . await ?;
659659 assert_eq ! ( elements, vector) ;
@@ -711,7 +711,7 @@ async fn queue_view_mutability_check() -> Result<()> {
711711 let front2 = new_vector. first ( ) . copied ( ) ;
712712 assert_eq ! ( front1, front2) ;
713713 let new_elements = view. queue . elements ( ) . await ?;
714- let new_hash = view. crypto_hash ( ) . await ?;
714+ let new_hash = view. crypto_hash_mut ( ) . await ?;
715715 if elements == new_elements {
716716 assert_eq ! ( new_hash, hash) ;
717717 } else {
@@ -762,7 +762,7 @@ async fn reentrant_collection_view_check() -> Result<()> {
762762 let nmax: u8 = 25 ;
763763 for _ in 0 ..n {
764764 let mut view = ReentrantCollectionStateView :: load ( context. clone ( ) ) . await ?;
765- let hash = view. crypto_hash ( ) . await ?;
765+ let hash = view. crypto_hash_mut ( ) . await ?;
766766 let key_values = view. key_values ( ) . await ?;
767767 assert_eq ! ( key_values, map) ;
768768 //
@@ -861,7 +861,7 @@ async fn reentrant_collection_view_check() -> Result<()> {
861861 }
862862 }
863863 // Checking the hash
864- let new_hash = view. crypto_hash ( ) . await ?;
864+ let new_hash = view. crypto_hash_mut ( ) . await ?;
865865 if new_map == map {
866866 assert_eq ! ( hash, new_hash) ;
867867 } else {
0 commit comments