Skip to content

Do HeaderDB really need a lock?  #53

Description

@zouxyan

BoltDB should already guarantee the transactionality of reading and writing the database. So, is the lock of HeaderDB necessary ?

type HeaderDB struct {
	lock      *sync.Mutex // really need it ? 
	db        *bolt.DB
	filePath  string
	bestCache *StoredHeader
	cache     *HeaderCache
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions