-
Notifications
You must be signed in to change notification settings - Fork 286
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(core-snapshot) improve snapshotService interface (#3727)
- Loading branch information
1 parent
a336694
commit 312a1a7
Showing
6 changed files
with
31 additions
and
11 deletions.
There are no files selected for viewing
26 changes: 23 additions & 3 deletions
26
packages/core-kernel/src/contracts/snapshot/snapshot-service.ts
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,8 +1,28 @@ | ||
export interface SnapshotService { | ||
dump(options: any): Promise<void>; | ||
restore(options: any): Promise<void>; | ||
dump(options: DumpOptions): Promise<void>; | ||
restore(options: RestoreOptions): Promise<void>; | ||
rollbackByHeight(height: number): Promise<void>; | ||
rollbackByNumber(number: number): Promise<void>; | ||
truncate(): Promise<void>; | ||
verify(options: any): Promise<void>; | ||
verify(options: VerifyOptions): Promise<void>; | ||
} | ||
|
||
export interface DumpOptions { | ||
network: string; | ||
codec?: string; | ||
skipCompression?: boolean; | ||
start?: number; | ||
end?: number; | ||
} | ||
|
||
export interface RestoreOptions { | ||
network: string; | ||
blocks: string; | ||
truncate?: boolean; | ||
verify?: boolean; | ||
} | ||
|
||
export interface VerifyOptions { | ||
network: string; | ||
blocks: string; | ||
} |
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