forked from TrueCloudLab/neoneo-go
storage: use Update for changeset processing
Batch is only relevant in multithreaded context, internally it'll do some magic and use the same locking/updating Update does, so it makes little sense for us. This doesn't change benchmarks in any noticeable way.
This commit is contained in:
parent
6380647770
commit
a5f8b8870a
1 changed files with 1 additions and 1 deletions
|
@ -92,7 +92,7 @@ func (s *BoltDBStore) PutBatch(batch Batch) error {
|
||||||
func (s *BoltDBStore) PutChangeSet(puts map[string][]byte) error {
|
func (s *BoltDBStore) PutChangeSet(puts map[string][]byte) error {
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
return s.db.Batch(func(tx *bbolt.Tx) error {
|
return s.db.Update(func(tx *bbolt.Tx) error {
|
||||||
b := tx.Bucket(Bucket)
|
b := tx.Bucket(Bucket)
|
||||||
for k, v := range puts {
|
for k, v := range puts {
|
||||||
if v != nil {
|
if v != nil {
|
||||||
|
|
Loading…
Reference in a new issue