Adding a pecial case when state is not empty and we have received request with zero-root digest
If zero-root digest is received and the current state is not empty, then
we immediately reply with the full-state message
diff --git a/model/sync-digest.h b/model/sync-digest.h
index 15c7278..42cfd81 100644
--- a/model/sync-digest.h
+++ b/model/sync-digest.h
@@ -108,6 +108,14 @@
inline Digest &
operator << (uint32_t value);
+ /**
+ * @brief Checks if the stored hash is zero-root hash
+ *
+ * Zero-root hash is a valid hash that optimally represents an empty state
+ */
+ bool
+ zero () const;
+
private:
Digest &
operator = (Digest &digest) { return *this; }