From 3357cbc91e7ff4d0d455c88785fc455067b34820 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Sat, 14 Mar 2020 21:14:52 +0100 Subject: Storage: filter ancestors and overwritable Ref and Stored Simple but slow implementation of the filtering for now. --- src/pubkey.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/pubkey.h') diff --git a/src/pubkey.h b/src/pubkey.h index 607352d..c922dc7 100644 --- a/src/pubkey.h +++ b/src/pubkey.h @@ -84,8 +84,8 @@ private: template Stored> SecretKey::sign(const Stored & val) const { - auto st = val.ref.storage(); - auto sig = st.store(Signature(pub(), sign(val.ref.digest()))); + auto st = val.ref().storage(); + auto sig = st.store(Signature(pub(), sign(val.ref().digest()))); return st.store(Signed(val, { sig })); } @@ -103,7 +103,7 @@ optional> Signed::load(const Ref & ref) vector> sigs; for (auto item : rec->items("sig")) if (auto sig = item.as()) - if (sig.value()->verify(data.value().ref)) + if (sig.value()->verify(data.value().ref())) sigs.push_back(sig.value()); return Signed(*data, sigs); -- cgit v1.2.3