This repository has been archived by the owner on Jun 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #60 from LiskHQ/57_add_interface_current_state
Add interface to get current root and version - Closes #57
- Loading branch information
Showing
11 changed files
with
282 additions
and
27 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 |
---|---|---|
|
@@ -331,4 +331,4 @@ module.exports = { | |
Database, | ||
InMemoryDatabase, | ||
Batch, | ||
}; | ||
}; |
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
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 |
---|---|---|
@@ -1,10 +1,14 @@ | ||
use crate::types::{KeyLength, SubtreeHeight, SubtreeHeightKind}; | ||
|
||
pub const PREFIX_STATE: &[u8] = &[0]; | ||
pub const PREFIX_SMT: &[u8] = &[1]; | ||
pub const PREFIX_DIFF: &[u8] = &[2]; | ||
|
||
pub const KEY_LENGTH: KeyLength = KeyLength(38); | ||
pub const SUBTREE_HEIGHT: SubtreeHeight = SubtreeHeight(SubtreeHeightKind::Eight); | ||
|
||
pub static PREFIX_BRANCH_HASH: &[u8] = &[1]; | ||
|
||
pub struct Prefix; | ||
impl Prefix { | ||
pub const STATE: &'static [u8] = &[0]; | ||
pub const SMT: &'static [u8] = &[1]; | ||
pub const DIFF: &'static [u8] = &[2]; | ||
pub const CURRENT_STATE: &'static [u8] = &[3]; | ||
} |
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
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
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
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
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
Oops, something went wrong.