@@ -74,7 +74,7 @@ use std::ops::Add;
74
74
75
75
pub mod util;
76
76
77
- pub struct VM < ' bs > {
77
+ pub struct TestVM < ' bs > {
78
78
pub store : & ' bs MemoryBlockstore ,
79
79
pub state_root : RefCell < Cid > ,
80
80
total_fil : TokenAmount ,
@@ -121,10 +121,10 @@ pub const TEST_FAUCET_ADDR: Address = Address::new_id(FIRST_NON_SINGLETON_ADDR +
121
121
pub const FIRST_TEST_USER_ADDR : ActorID = FIRST_NON_SINGLETON_ADDR + 3 ;
122
122
123
123
// accounts for verifreg root signer and msig
124
- impl < ' bs > VM < ' bs > {
125
- pub fn new ( store : & ' bs MemoryBlockstore ) -> VM < ' bs > {
124
+ impl < ' bs > TestVM < ' bs > {
125
+ pub fn new ( store : & ' bs MemoryBlockstore ) -> TestVM < ' bs > {
126
126
let mut actors = Hamt :: < & ' bs MemoryBlockstore , Actor , BytesKey , Sha256 > :: new ( store) ;
127
- VM {
127
+ TestVM {
128
128
store,
129
129
state_root : RefCell :: new ( actors. flush ( ) . unwrap ( ) ) ,
130
130
total_fil : TokenAmount :: zero ( ) ,
@@ -140,11 +140,11 @@ impl<'bs> VM<'bs> {
140
140
Self { total_fil, ..self }
141
141
}
142
142
143
- pub fn new_with_singletons ( store : & ' bs MemoryBlockstore ) -> VM < ' bs > {
143
+ pub fn new_with_singletons ( store : & ' bs MemoryBlockstore ) -> TestVM < ' bs > {
144
144
let reward_total = TokenAmount :: from_whole ( 1_100_000_000i64 ) ;
145
145
let faucet_total = TokenAmount :: from_whole ( 1_000_000_000i64 ) ;
146
146
147
- let v = VM :: new ( store) . with_total_fil ( & reward_total + & faucet_total) ;
147
+ let v = TestVM :: new ( store) . with_total_fil ( & reward_total + & faucet_total) ;
148
148
149
149
// system
150
150
let sys_st = SystemState :: new ( store) . unwrap ( ) ;
@@ -283,9 +283,9 @@ impl<'bs> VM<'bs> {
283
283
v
284
284
}
285
285
286
- pub fn with_epoch ( self , epoch : ChainEpoch ) -> VM < ' bs > {
286
+ pub fn with_epoch ( self , epoch : ChainEpoch ) -> TestVM < ' bs > {
287
287
self . checkpoint ( ) ;
288
- VM {
288
+ TestVM {
289
289
store : self . store ,
290
290
state_root : self . state_root . clone ( ) ,
291
291
total_fil : self . total_fil ,
@@ -599,7 +599,7 @@ pub const TEST_VM_RAND_ARRAY: [u8; 32] = [
599
599
pub const TEST_VM_INVALID_POST : & str = "i_am_invalid_post" ;
600
600
601
601
pub struct InvocationCtx < ' invocation , ' bs > {
602
- v : & ' invocation VM < ' bs > ,
602
+ v : & ' invocation TestVM < ' bs > ,
603
603
top : TopCtx ,
604
604
msg : InternalMessage ,
605
605
allow_side_effects : RefCell < bool > ,
@@ -1123,7 +1123,7 @@ impl<'invocation, 'bs> Runtime for InvocationCtx<'invocation, 'bs> {
1123
1123
}
1124
1124
}
1125
1125
1126
- impl Primitives for VM < ' _ > {
1126
+ impl Primitives for TestVM < ' _ > {
1127
1127
// A "valid" signature has its bytes equal to the plaintext.
1128
1128
// Anything else is considered invalid.
1129
1129
fn verify_signature (
0 commit comments