This website works better with JavaScript.
Home
Help
Sign In
zolfa
/
tendermint
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Projects
0
Releases
221
Wiki
Activity
Browse Source
db: add Close() to db interface.
closes
#31
pull/33/head
Ethan Buchman
10 years ago
parent
bf87ec1070
commit
94c200711b
2 changed files
with
5 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+1
-0
db/db.go
+4
-0
db/mem_db.go
+ 1
- 0
db/db.go
View File
@ -13,6 +13,7 @@ type DB interface {
SetSync
(
[
]
byte
,
[
]
byte
)
Delete
(
[
]
byte
)
DeleteSync
(
[
]
byte
)
Close
(
)
// For debugging
Print
(
)
+ 4
- 0
db/mem_db.go
View File
@ -33,6 +33,10 @@ func (db *MemDB) DeleteSync(key []byte) {
delete
(
db
.
db
,
string
(
key
)
)
}
func
(
db
*
MemDB
)
Close
(
)
{
db
=
nil
}
func
(
db
*
MemDB
)
Print
(
)
{
for
key
,
value
:=
range
db
.
db
{
fmt
.
Printf
(
"[%X]:\t[%X]\n"
,
[
]
byte
(
key
)
,
value
)
Write
Preview
Loading…
Cancel
Save