diff --git a/depends/packages/libsodium.mk b/depends/packages/libsodium.mk index 7cc093ca4..a4adea6b6 100644 --- a/depends/packages/libsodium.mk +++ b/depends/packages/libsodium.mk @@ -2,7 +2,7 @@ package=libsodium $(package)_version=1.0.18 $(package)_download_path=https://download.libsodium.org/libsodium/releases/ $(package)_file_name=$(package)-$($(package)_version)-stable.tar.gz -$(package)_sha256_hash=7673be93a53f6dcfebc03122063ca65a26e2eea723788d1b826abe6d5fcf3837 +$(package)_sha256_hash=f9f2114ef2460c80d97db07a3fe6fcd058cdb4ffb5ca84f4b4c61f81b2907289 define $(package)_set_vars $(package)_config_opts_mingw32+=CFLAGS="-Ofast -fomit-frame-pointer -march=pentium3 -mtune=westmere" diff --git a/src/keva/main.cpp b/src/keva/main.cpp index f663beb40..234f9e133 100644 --- a/src/keva/main.cpp +++ b/src/keva/main.cpp @@ -39,9 +39,11 @@ void CKevaTxUndo::apply(CCoinsViewCache& view) const { if (isNew) { - view.DeleteKey(nameSpace, key); - } - else { + CKevaData oldData; + if (view.GetName(nameSpace, key, oldData)) { + view.DeleteKey(nameSpace, key); + } + } else { view.SetKeyValue(nameSpace, key, oldData, true); } }