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:
Olaoluwa Osuntokun committed 2016-11-27 18:44:23 -08:00
1 parent 5b2f9a5b69
commit 7454b7df95
3 files changed
+41 -47

No files matched your search

+1 -1
View File
@@ -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
}