@@ -5,7 +5,7 @@ use std::cell::RefCell;
5
5
use std:: collections:: HashMap ;
6
6
7
7
use anyhow:: { anyhow, Context as _} ;
8
- use cid:: { multihash , Cid } ;
8
+ use cid:: Cid ;
9
9
use fvm_ipld_blockstore:: Blockstore ;
10
10
use fvm_ipld_encoding:: tuple:: * ;
11
11
use fvm_ipld_encoding:: CborStore ;
@@ -208,7 +208,10 @@ where
208
208
}
209
209
StateTreeVersion :: V3 | StateTreeVersion :: V4 => {
210
210
let cid = store
211
- . put_cbor ( & StateInfo0 :: default ( ) , multihash:: Code :: Blake2b256 )
211
+ . put_cbor (
212
+ & StateInfo0 :: default ( ) ,
213
+ multihash_codetable:: Code :: Blake2b256 ,
214
+ )
212
215
. context ( "failed to put state info" )
213
216
. or_fatal ( ) ?;
214
217
Some ( cid)
@@ -424,7 +427,7 @@ where
424
427
// Set state for init actor in store and update root Cid
425
428
actor. state = self
426
429
. store ( )
427
- . put_cbor ( & state, multihash :: Code :: Blake2b256 )
430
+ . put_cbor ( & state, multihash_codetable :: Code :: Blake2b256 )
428
431
. or_fatal ( ) ?;
429
432
430
433
self . set_actor ( & crate :: init_actor:: INIT_ACTOR_ADDR , actor) ?;
@@ -484,7 +487,7 @@ where
484
487
} ;
485
488
let root = self
486
489
. store ( )
487
- . put_cbor ( obj, multihash :: Code :: Blake2b256 )
490
+ . put_cbor ( obj, multihash_codetable :: Code :: Blake2b256 )
488
491
. or_fatal ( ) ?;
489
492
Ok ( root)
490
493
}
@@ -629,8 +632,6 @@ pub mod json {
629
632
630
633
#[ cfg( test) ]
631
634
mod tests {
632
- use cid:: multihash:: Code :: Blake2b256 ;
633
- use cid:: multihash:: Multihash ;
634
635
use cid:: Cid ;
635
636
use fvm_ipld_blockstore:: MemoryBlockstore ;
636
637
use fvm_ipld_encoding:: { CborStore , DAG_CBOR } ;
@@ -640,6 +641,7 @@ mod tests {
640
641
use fvm_shared:: state:: StateTreeVersion ;
641
642
use fvm_shared:: { IDENTITY_HASH , IPLD_RAW } ;
642
643
use lazy_static:: lazy_static;
644
+ use multihash_codetable:: { Code :: Blake2b256 , Multihash } ;
643
645
644
646
use crate :: init_actor;
645
647
use crate :: init_actor:: INIT_ACTOR_ADDR ;
0 commit comments