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
}