-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
client(consensus/grandpa): implement grandpaDb and environment types (#…
- Loading branch information
1 parent
c5863a2
commit a0d4e4d
Showing
10 changed files
with
2,706 additions
and
729 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// Copyright 2023 ChainSafe Systems (ON) | ||
// SPDX-License-Identifier: LGPL-3.0-only | ||
|
||
package api | ||
|
||
type Key []byte | ||
|
||
type KeyValue struct { | ||
Key Key | ||
Value []byte | ||
} | ||
|
||
// AuxStore is part of the substrate backend. | ||
// Provides access to an auxiliary database. | ||
// | ||
// This is a simple global database not aware of forks. Can be used for storing auxiliary | ||
// information like total block weight/difficulty for fork resolution purposes as a common use | ||
// case. | ||
type AuxStore interface { | ||
// Insert auxiliary data into key-Value store. | ||
// | ||
// Deletions occur after insertions. | ||
Insert(insert []KeyValue, delete []Key) error | ||
// Get Query auxiliary data from key-Value store. | ||
Get(key Key) (*[]byte, error) | ||
} |
Oops, something went wrong.