Skip to content
This repository was archived by the owner on Aug 21, 2024. It is now read-only.
This repository was archived by the owner on Aug 21, 2024. It is now read-only.

Add a State::set_nonce_at method #1772

@tdelabro

Description

@tdelabro

When using a transactional state you end up with state changes that include an address nonce going from value n to value n + x, where x can be a number between n and a lot.

The State trait only exposes the increment_nonce method to interact with this specific storage. This means that if I want to apply my state changes to my actual storage I will have to keep calling increment_nonce inside a loop until it reaches the correct value. This is a very bad API. A set_nonce_at method should be exposed in order to set the new value in a single write.

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