Skip to content

Commit dfc9873

Browse files
committed
refactor: Remove ReadHeader and ReadBody methods, and add Inspect method for reporting
1 parent 9077818 commit dfc9873

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

database/database.go

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,15 +103,12 @@ type BlockDatabase interface {
103103
// ReadBlock retrieves a block by its height.
104104
ReadBlock(height uint64) ([]byte, error)
105105

106-
// ReadHeader retrieves only the header portion of a block by its height.
107-
ReadHeader(height uint64) ([]byte, error)
108-
109-
// ReadBody retrieves only the body portion (excluding header) of a block by its height.
110-
ReadBody(height uint64) ([]byte, error)
111-
112106
// HasBlock checks if a block exists at the given height.
113107
HasBlock(height uint64) (bool, error)
114108

109+
// Inspect returns a detailed report of the block database.
110+
Inspect() (string, error)
111+
115112
// Close closes the block database.
116113
Close() error
117114
}

0 commit comments

Comments
 (0)