swarm/shed: fix comments

This commit is contained in:
Janos Guljas 2019-03-13 09:34:11 +01:00
parent cbe9c79fac
commit 6ec7110b49

View file

@ -68,7 +68,7 @@ func (f Uint64Vector) PutInBatch(batch *leveldb.Batch, i, val uint64) {
} }
// Inc increments a uint64 value in the database. // Inc increments a uint64 value in the database.
// This operation is not goroutine save. // This operation is not goroutine safe.
func (f Uint64Vector) Inc(i uint64) (val uint64, err error) { func (f Uint64Vector) Inc(i uint64) (val uint64, err error) {
val, err = f.Get(i) val, err = f.Get(i)
if err != nil { if err != nil {
@ -84,7 +84,7 @@ func (f Uint64Vector) Inc(i uint64) (val uint64, err error) {
// IncInBatch increments a uint64 value at index i in the batch // IncInBatch increments a uint64 value at index i in the batch
// by retreiving a value from the database, not the same batch. // by retreiving a value from the database, not the same batch.
// This operation is not goroutine save. // This operation is not goroutine safe.
func (f Uint64Vector) IncInBatch(batch *leveldb.Batch, i uint64) (val uint64, err error) { func (f Uint64Vector) IncInBatch(batch *leveldb.Batch, i uint64) (val uint64, err error) {
val, err = f.Get(i) val, err = f.Get(i)
if err != nil { if err != nil {
@ -100,7 +100,7 @@ func (f Uint64Vector) IncInBatch(batch *leveldb.Batch, i uint64) (val uint64, er
} }
// Dec decrements a uint64 value at index i in the database. // Dec decrements a uint64 value at index i in the database.
// This operation is not goroutine save. // This operation is not goroutine safe.
// The field is protected from overflow to a negative value. // The field is protected from overflow to a negative value.
func (f Uint64Vector) Dec(i uint64) (val uint64, err error) { func (f Uint64Vector) Dec(i uint64) (val uint64, err error) {
val, err = f.Get(i) val, err = f.Get(i)
@ -119,7 +119,7 @@ func (f Uint64Vector) Dec(i uint64) (val uint64, err error) {
// DecInBatch decrements a uint64 value at index i in the batch // DecInBatch decrements a uint64 value at index i in the batch
// by retreiving a value from the database, not the same batch. // by retreiving a value from the database, not the same batch.
// This operation is not goroutine save. // This operation is not goroutine safe.
// The field is protected from overflow to a negative value. // The field is protected from overflow to a negative value.
func (f Uint64Vector) DecInBatch(batch *leveldb.Batch, i uint64) (val uint64, err error) { func (f Uint64Vector) DecInBatch(batch *leveldb.Batch, i uint64) (val uint64, err error) {
val, err = f.Get(i) val, err = f.Get(i)