Branch: refs/heads/master
  Home:   https://github.com/btcsuite/btcd
  Commit: 2cfc6478ce138bdbdb9f39bcd7830ee2a5631bf2
      
https://github.com/btcsuite/btcd/commit/2cfc6478ce138bdbdb9f39bcd7830ee2a5631bf2
  Author: Dave Collins <da...@conformal.com>
  Date:   2016-10-26 (Wed, 26 Oct 2016)

  Changed paths:
    M mempool/mempool.go
    M mempool/policy.go
    M mining.go
    M mining/policy.go

  Log Message:
  -----------
  mining/mempool: Move priority code to mining pkg.

This moves the priority-related code from the mempool package to the
mining package and also exports a new constant named UnminedHeight which
takes the place of the old unexported mempoolHeight.

Even though the mempool makes use of the priority code to make decisions
about what it will accept, priority really has to do with mining since
it influences which transactions will end up into a block.  This change
also has the side effect of being a step towards enabling separation of
the mining code into its own package which, as previously mentioned,
needs access to the priority calculation code as well.

Finally, the mempoolHeight variable was poorly named since what it
really represents is a transaction that has not been mined into a block
yet.  Renaming the variable to more accurately reflect its purpose makes
it clear that it belongs in the mining package which also needs the
definition now as well since the priority calculation code relies on it.
This will also benefit an outstanding PR which needs access to the same
value.


Reply via email to