From 166d923efd191bcf04c27f6cc74a182d55ca32e0 Mon Sep 17 00:00:00 2001 From: cwbhhjl Date: Mon, 5 Feb 2024 15:48:08 +0800 Subject: [PATCH] use btree map --- .../zkwasm/src/runtime/host/internal_circuit_plugin.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/zkwasm/src/runtime/host/internal_circuit_plugin.rs b/crates/zkwasm/src/runtime/host/internal_circuit_plugin.rs index 67de479b0..bdf27fee0 100644 --- a/crates/zkwasm/src/runtime/host/internal_circuit_plugin.rs +++ b/crates/zkwasm/src/runtime/host/internal_circuit_plugin.rs @@ -1,7 +1,7 @@ use specs::host_function::HostPlugin; use specs::host_function::Signature; use std::cell::RefCell; -use std::collections::HashMap; +use std::collections::BTreeMap; use std::rc::Rc; use wasmi::tracer::Observer; use wasmi::FuncInstance; @@ -21,16 +21,16 @@ pub(super) struct ForeignOp { } pub struct InternalCircuitEnv { - pub(super) plugins: HashMap, - pub(super) functions: HashMap, + pub(super) plugins: BTreeMap, + pub(super) functions: BTreeMap, finalized: Rc>, } impl InternalCircuitEnv { pub(super) fn new(finalized: Rc>) -> Self { Self { - plugins: HashMap::new(), - functions: HashMap::new(), + plugins: BTreeMap::new(), + functions: BTreeMap::new(), finalized, } }