forked from Silverfish/proton-bridge
Other: Use msgpack instead of json in vault
msgpack is much faster at serializing and deserializing than json. Using it in the vault gives a performance boost.
This commit is contained in:
@ -168,13 +168,13 @@ func (vault *Vault) SetAutoUpdate(autoUpdate bool) error {
|
||||
|
||||
// GetLastVersion returns the last version of the bridge that was run.
|
||||
func (vault *Vault) GetLastVersion() *semver.Version {
|
||||
return vault.get().Settings.LastVersion
|
||||
return semver.MustParse(vault.get().Settings.LastVersion)
|
||||
}
|
||||
|
||||
// SetLastVersion sets the last version of the bridge that was run.
|
||||
func (vault *Vault) SetLastVersion(version *semver.Version) error {
|
||||
return vault.mod(func(data *Data) {
|
||||
data.Settings.LastVersion = version
|
||||
data.Settings.LastVersion = version.String()
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user