]> Git Repo - VerusCoin.git/commitdiff
Reorganize(): remove spurious TxnAbort()
authorJeff Garzik <[email protected]>
Mon, 14 May 2012 16:21:03 +0000 (12:21 -0400)
committerJeff Garzik <[email protected]>
Sun, 20 May 2012 00:40:43 +0000 (20:40 -0400)
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

index 8ff6d6fec0d74e2fcfc512aabba0a9d943f38762..f516ad65b528ef957d3b5044da0948b2d0b93975 100644 (file)
@@ -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());
         }
 
This page took 0.036739 seconds and 4 git commands to generate.