Skip to content

Commit

Permalink
ethdb: don't mess with the insert batches for now
Browse files Browse the repository at this point in the history
  • Loading branch information
karalabe committed Mar 30, 2021
1 parent 091c2c7 commit 7977600
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ethdb/leveldb/leveldb.go
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ type batch struct {
// Put inserts the given value into the batch for later committing.
func (b *batch) Put(key, value []byte) error {
b.b.Put(key, value)
b.size += len(key) + len(value)
b.size += len(value)
return nil
}

Expand Down
2 changes: 1 addition & 1 deletion ethdb/memorydb/memorydb.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ type batch struct {
// Put inserts the given value into the batch for later committing.
func (b *batch) Put(key, value []byte) error {
b.writes = append(b.writes, keyvalue{common.CopyBytes(key), common.CopyBytes(value), false})
b.size += len(key) + len(value)
b.size += len(value)
return nil
}

Expand Down

0 comments on commit 7977600

Please sign in to comment.