Skip to content

Commit 64a103e

Browse files
authored
Update VM trait (#1340)
* update VM trait to align with anorth/fvm-workbench * update tests to check invariants on the concrete types * Revert "update tests to check invariants on the concrete types" This reverts commit 8351d66. * wip * extract policy out of VM trait * add set circulating supply onto the trait * use static builtin-actors manifest
1 parent a77674d commit 64a103e

19 files changed

+325
-242
lines changed

state/src/check.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1+
use std::collections::BTreeMap;
12
use std::collections::HashMap;
23
use std::fmt::Debug;
34

45
use anyhow::bail;
5-
use bimap::BiBTreeMap;
66
use cid::Cid;
77
use fil_actor_account::State as AccountState;
88
use fil_actor_cron::State as CronState;
@@ -114,7 +114,7 @@ macro_rules! get_state {
114114
// It could be replaced with a custom mapping trait (while Rust doesn't support
115115
// abstract collection traits).
116116
pub fn check_state_invariants<BS: Blockstore>(
117-
manifest: &BiBTreeMap<Cid, Type>,
117+
manifest: &BTreeMap<Cid, Type>,
118118
policy: &Policy,
119119
tree: Tree<'_, BS>,
120120
expected_balance_total: &TokenAmount,
@@ -143,7 +143,7 @@ pub fn check_state_invariants<BS: Blockstore>(
143143
}
144144
total_fil += &actor.balance;
145145

146-
match manifest.get_by_left(&actor.code) {
146+
match manifest.get(&actor.code) {
147147
Some(Type::System) => (),
148148
Some(Type::Init) => {
149149
let state = get_state!(tree, actor, InitState);

0 commit comments

Comments
 (0)