Skip to content

smoldot ExternalOffchainIndexSet doesn't set offchain storage. #2117

@Wsteth

Description

@Wsteth

smoldot version: 0.19.3

Hi there,
I use chopsticks to test some offchain things.
the runtime code use offchain_index.set, but it doesn't work.
I found the problem occurs here.

host::HostVm::ExternalOffchainIndexSet(req) => {
self.pending_storage_changes
.offchain_storage_changes
.insert(
req.key().as_ref().to_vec(),
req.value().map(|v| v.as_ref().to_vec()),
);
self.vm = req.resume();
}

It seems there is nothing done with add pending_storage_changes, and when I remove pending_storage_changes, I can get the storage value.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions