Branch: refs/heads/master
  Home:   https://github.com/conformal/btcd
  Commit: c6d865f3b518e801f856945577902030f4600bb7
      
https://github.com/conformal/btcd/commit/c6d865f3b518e801f856945577902030f4600bb7
  Author: Dave Collins <[email protected]>
  Date:   2014-01-30 (Thu, 30 Jan 2014)

  Changed paths:
    M blockmanager.go

  Log Message:
  -----------
  Cleanup and slightly optimize the progress logging.

Previously the logging function which reports on progress was called for
every block, regardless of whether it was an orphan or not.  This could be
confusing since it could show a different number of blocks processed as
compared to the old versus new heights reported (orphans do not add to the
block height since they aren't extending the main chain).  Further, the
database had to be consulted for the latest block since the block we just
processed might not be the latest one if it was an orphan.  This is quite
a bit more time conusming than it should've been for progress reporting.

This commit modifies that to only include non-orphan blocks.  As a result,
the latest height shown will match the number of blocks processed (even
when there are orphans) and the additional block lookup from the database
is avoided.


Reply via email to