From 9d54277db13e7469946b29cd159ee0ce83ad4201 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Mon, 27 Oct 2014 17:34:08 -0700 Subject: [PATCH] add comment explaining is_allocated. --- src/bitcoindjs.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/bitcoindjs.cc b/src/bitcoindjs.cc index a0dad6f6..fea7a4b3 100644 --- a/src/bitcoindjs.cc +++ b/src/bitcoindjs.cc @@ -3438,7 +3438,8 @@ cblock_to_jsblock(const CBlock& cblock, CBlockIndex* cblock_index, Local std::string strHex = HexStr(ssBlock.begin(), ssBlock.end()); jsblock->Set(NanNew("hex"), NanNew(strHex)); - // Freed up elsewhere: + // Was it allocated in find_new_block_index(), or did it already exist? + // (race condition here) if (is_allocated) { delete cblock_index; }