Skip to content

Wallet's persistence should have a fixed "header" section #125

@evanlinjin

Description

@evanlinjin

Describe the enhancement

Add a fixed header section to the wallet's persistence.

This is initially proposed by @LLFourn: bitcoindevkit/bdk#1178 (comment)

Use case

This can be used to store data that are mostly unchanging such as network type, version, etc.

Implementation proposal

pub struct Database<H, C>: PersistBackend<C> {
    fn write_header(&mut self, header: H) -> Result<(), Self::WriteError>;
    fn load_header(&self) -> Result<H, Self::LoadError>;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    new featureNew feature or request

    Type

    No type

    Projects

    Status

    Discussion

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions