channeldb: slightly refactor the [Fetch|Put]Meta methods
This commit performs a slight refactoring of the internals (and API) of the [Fetch|Put]Meta methods. The changes are rather minor and simply eliminate the conditional branching structure with usage of an internal function. This new form is much easier to follow.
This commit is contained in:
3 files changed
+41
-47
No files matched your search
+1
-1
@@ -337,7 +337,7 @@ func (d *DB) syncVersions(versions []version) error {
|
||||
}
|
||||
|
||||
meta.DbVersionNumber = latestVersion
|
||||
if err := d.PutMeta(meta, tx); err != nil {
|
||||
if err := putMeta(meta, tx); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user