Function darkfi::runtime::import::util::get_last_block_height

source ·
pub(crate) fn get_last_block_height(ctx: FunctionEnvMut<'_, Env>) -> i64
Expand description

Grabs last block from the Blockchain overlay and then copies its height to the VM’s object store.

On success, returns the index of the new object in the object store. Otherwise, returns an error code.

Permissions: deploy, metadata, exec