From b52a27053850590e0ac8f1431a9aad50b7beffee Mon Sep 17 00:00:00 2001 From: Jeff Garzik Date: Mon, 14 May 2012 12:21:03 -0400 Subject: [PATCH] Reorganize(): remove spurious TxnAbort() If Reorganize() fails, then its caller, CBlock::SetBestChain(), will call TxnAbort(). Redundant TxnAbort() calls are harmless. The second will return an error return value, with no other side effects. TxnAbort() return values are generally never checked. The impact is nil. --- src/main.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 8ff6d6fec..f516ad65b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1438,7 +1438,6 @@ bool static Reorganize(CTxDB& txdb, CBlockIndex* pindexNew) if (!block.ConnectBlock(txdb, pindex)) { // Invalid block - txdb.TxnAbort(); return error("Reorganize() : ConnectBlock %s failed", pindex->GetBlockHash().ToString().substr(0,20).c_str()); }