Branch: refs/heads/master
Home: https://github.com/conformal/btcd
Commit: 3dc3fefc9b4b99205ca990cde8223d411da0373f
https://github.com/conformal/btcd/commit/3dc3fefc9b4b99205ca990cde8223d411da0373f
Author: Dave Collins <[email protected]>
Date: 2014-08-19 (Tue, 19 Aug 2014)
Changed paths:
M mempool.go
Log Message:
-----------
Improve readability of recent rate limiter changes.
This commit builds on the recent limiter updates. The recent changes
introduced a new function named calcTxFee which could easily be confused
with calculating the fees of the transaction rather than its intended
purpose of calculating the minimum transaciton relay fee.
Rather than taking that approach, this commit instead renames the existing
function to calcMinRequiredTxRelayFee and uses a consistent variable name
for the serialized size of a transaction. It then moves the check for
whether or not the check should be applied based on the serialized size of
the transcation and block priority to the call site.
This approach also has the benefit of avoiding two calls to the
calculation function since it's a local at the call site.
ok @jrick, @dajohi