Skip to content

Commit e1bdaf3

Browse files
Stebalienshamb0
authored andcommitted
fix: make the empty array CID const and export it (filecoin-project#668)
Otherwise, we'll perform a hash in WASM when we first dereference (max once per call) which is just wasteful. This also fixes the integration tests to use the "correct" empty object. Previously, they were using `()` which mapped to null, not `[]`.
1 parent 752c46e commit e1bdaf3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

runtime/src/runtime/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ pub(crate) mod hash_algorithm;
4242
pub(crate) mod empty;
4343
pub use empty::EMPTY_ARR_CID;
4444

45+
pub(crate) mod empty;
46+
pub use empty::EMPTY_ARR_CID;
47+
4548
/// Runtime is the VM's internal runtime object.
4649
/// this is everything that is accessible to actors, beyond parameters.
4750
pub trait Runtime<BS: Blockstore>: Primitives + Verifier + RuntimePolicy {

0 commit comments

Comments
 (0)