upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src/rpc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/rpc.cpp')
-rw-r--r--src/rpc.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/rpc.cpp b/src/rpc.cpp
index 7d7cc8f..c382926 100644
--- a/src/rpc.cpp
+++ b/src/rpc.cpp
@@ -644,6 +644,14 @@ static void PublishVersioned(const std::string& path, const VersionedBlob& v,
644 std::mutex& fileMutex, uint64& publishedSeq, 644 std::mutex& fileMutex, uint64& publishedSeq,
645 const char* what) 645 const char* what)
646{ 646{
647 // A default-constructed blob is not a snapshot of anything; it is a
648 // VersionedBlob nobody filled in. Today they are already dropped, because
649 // every serialiser stamps ++gSeq and so never produces 0, and 0 fails the
650 // seq <= publishedSeq test below -- but only for as long as publishedSeq
651 // starts at 0 and nobody writes `seq = gSeq++`. One character, and the
652 // ledger file becomes "[]". Say it out loud instead of relying on it.
653 if (!v.seq)
654 return;
647 // A file whose loader threw is not a file this process knows the contents 655 // A file whose loader threw is not a file this process knows the contents
648 // of. Writing it would replace a full record of what was owed with 656 // of. Writing it would replace a full record of what was owed with
649 // whatever happened to parse before the error. 657 // whatever happened to parse before the error.