@@ -14,8 +14,8 @@ use fil_actor_verifreg::State as VerifRegState;
14
14
use fil_actors_runtime:: cbor:: serialize;
15
15
use fil_actors_runtime:: runtime:: builtins:: Type ;
16
16
use fil_actors_runtime:: runtime:: { Policy , Primitives , EMPTY_ARR_CID } ;
17
- use fil_actors_runtime:: test_utils:: * ;
18
17
use fil_actors_runtime:: DATACAP_TOKEN_ACTOR_ADDR ;
18
+ use fil_actors_runtime:: { test_utils:: * , DEFAULT_HAMT_CONFIG } ;
19
19
use fil_actors_runtime:: {
20
20
BURNT_FUNDS_ACTOR_ADDR , CRON_ACTOR_ADDR , EAM_ACTOR_ADDR , INIT_ACTOR_ADDR , REWARD_ACTOR_ADDR ,
21
21
STORAGE_MARKET_ACTOR_ADDR , STORAGE_POWER_ACTOR_ADDR , SYSTEM_ACTOR_ADDR ,
70
70
BS : Blockstore ,
71
71
{
72
72
pub fn new ( store : & ' bs MemoryBlockstore ) -> TestVM < ' bs , MemoryBlockstore > {
73
- let mut actors = Hamt :: < & ' bs MemoryBlockstore , ActorState , BytesKey , Sha256 > :: new ( store) ;
73
+ let mut actors =
74
+ Hamt :: < & ' bs MemoryBlockstore , ActorState , BytesKey , Sha256 > :: new_with_config (
75
+ store,
76
+ DEFAULT_HAMT_CONFIG ,
77
+ ) ;
74
78
TestVM {
75
79
primitives : FakePrimitives { } ,
76
80
store,
@@ -240,9 +244,10 @@ where
240
244
241
245
pub fn checkpoint ( & self ) -> Cid {
242
246
// persist cache on top of latest checkpoint and clear
243
- let mut actors = Hamt :: < & ' bs BS , ActorState , BytesKey , Sha256 > :: load (
247
+ let mut actors = Hamt :: < & ' bs BS , ActorState , BytesKey , Sha256 > :: load_with_config (
244
248
& self . state_root . borrow ( ) ,
245
249
self . store ,
250
+ DEFAULT_HAMT_CONFIG ,
246
251
)
247
252
. unwrap ( ) ;
248
253
for ( addr, act) in self . actors_cache . borrow ( ) . iter ( ) {
@@ -383,9 +388,10 @@ where
383
388
return Some ( act. clone ( ) ) ;
384
389
}
385
390
// go to persisted map
386
- let actors = Hamt :: < & ' bs BS , ActorState , BytesKey , Sha256 > :: load (
391
+ let actors = Hamt :: < & ' bs BS , ActorState , BytesKey , Sha256 > :: load_with_config (
387
392
& self . state_root . borrow ( ) ,
388
393
self . store ,
394
+ DEFAULT_HAMT_CONFIG ,
389
395
)
390
396
. unwrap ( ) ;
391
397
let actor = actors. get ( & address. to_bytes ( ) ) . unwrap ( ) . cloned ( ) ;
0 commit comments