[prev in list] [next in list] [prev in thread] [next in thread] 

List:       btcd-commits
Subject:    [btcsuite/btcd] df33d4: server: Ensure callbacks use the server peer.
From:       Dave Collins <davec () conformal ! com>
Date:       2016-11-04 18:49:31
Message-ID: 581cd83bd5870_55d73ff869aff13088980 () hookshot-fe3-cp1-prd ! iad ! github ! net ! mail
[Download RAW message or body]


  Branch: refs/heads/master
  Home:   https://github.com/btcsuite/btcd
  Commit: df33d4340e921eb9195225c67eed8b65071d40a5
      https://github.com/btcsuite/btcd/commit/df33d4340e921eb9195225c67eed8b65071d40a5
  Author: Dave Collins <davec@conformal.com>
  Date:   2016-11-04 (Fri, 04 Nov 2016)

  Changed paths:
    M server.go

  Log Message:
  -----------
  server: Ensure callbacks use the server peer.

This modifies the signatures of all serverPeer callbacks that are
provided as peer.Listeners to use _ for the first parameter name which
ensures the passed peer can't be used within the function and updates
all references to the server peer.

This helps ensure any overridden methods that might be defined on a
serverPeer will be invoked where directly calling methods on the passed
peer would not.

Also, while here, add a comment to the OnFeeFilter function.




[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic