Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

[off-chain worker] expose a transaction based storage API #6139

Description

@drahnr

As suggested in #6010 https://github.com/paritytech/substrate/pull/6010/files/ce606550a9e118772858307020edbf7bcdf0daa1#r424727256 for sake of data consistency an additional API based on Transactions might be advantageous.

let mut tx = Transaction::new();
tx.clear(key1);
tx.set(key2, value);
offchain::commit(tx);

Using this instead of multiple API calls have also potential storage performance benefits.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    I9-optimisationAn enhancement to provide better overall performance in terms of time-to-completion for a task.J0-enhancementAn additional feature request.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions