-
Notifications
You must be signed in to change notification settings - Fork 807
Support proposervm historical block deletion #1929
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
5e0d4fd
eb7fa86
7bf53bd
69b12e0
9eb82f0
9b48986
d82a041
fbc5101
915a3b5
15e73dd
8efd994
62e5cad
0868049
9fe8e8e
2be9520
9817f3b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,6 +31,7 @@ var ( | |
type BlockState interface { | ||
GetBlock(blkID ids.ID) (block.Block, choices.Status, error) | ||
PutBlock(blk block.Block, status choices.Status) error | ||
DeleteBlock(blkID ids.ID) error | ||
} | ||
|
||
type blockState struct { | ||
|
@@ -134,3 +135,8 @@ func (s *blockState) PutBlock(blk block.Block, status choices.Status) error { | |
s.blkCache.Put(blkID, &blkWrapper) | ||
return s.db.Put(blkID[:], bytes) | ||
} | ||
|
||
func (s *blockState) DeleteBlock(blkID ids.ID) error { | ||
s.blkCache.Evict(blkID) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Delete seems fine with me. |
||
return s.db.Delete(blkID[:]) | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.