Branch: refs/heads/master
  Home:   https://github.com/conformal/btcd
  Commit: a39f4a0698ccb5d7bfda9410e266fc861d98994b
      
https://github.com/conformal/btcd/commit/a39f4a0698ccb5d7bfda9410e266fc861d98994b
  Author: Dave Collins <[email protected]>
  Date:   2014-02-05 (Wed, 05 Feb 2014)

  Changed paths:
    M peer.go
    M rpcserver.go
    M server.go

  Log Message:
  -----------
  Correct total byte counters for server.

Previously the getnettotals was just looping through all of the currently
connected peers to sum the byte counts and returning that.  However, the
intention of the getnettotals RPC is to get all bytes since the server was
started, so this logic was not correct.

This commit modifies the code to keep an atomic counter on the server for
bytes read/written and has each peer update the server counters as well as
the per-peer counters.


Reply via email to