Export CoinbaseMaturity as a const.

The unexported variable is still kept so that tests may modify it.

ok @davecgh
This commit is contained in:
Josh Rickmar 2014-04-14 07:59:30 -05:00
parent 958ea38fdd
commit 79beb22aef

View file

@ -45,14 +45,17 @@ const (
// baseSubsidy is the starting subsidy amount for mined blocks. This // baseSubsidy is the starting subsidy amount for mined blocks. This
// value is halved every SubsidyHalvingInterval blocks. // value is halved every SubsidyHalvingInterval blocks.
baseSubsidy = 50 * btcutil.SatoshiPerBitcoin baseSubsidy = 50 * btcutil.SatoshiPerBitcoin
// CoinbaseMaturity is the number of blocks required before newly
// mined bitcoins (coinbase transactions) can be spent.
CoinbaseMaturity = 100
) )
var ( var (
// coinbaseMaturity is the number of blocks required before newly // coinbaseMaturity is the internal variable used for validating the
// mined bitcoins (coinbase transactions) can be spent. This is a // spending of coinbase outputs. A variable rather than the exported
// variable as opposed to a constant because the tests need the ability // constant is used because the tests need the ability to modify it.
// to modify it. coinbaseMaturity int64 = CoinbaseMaturity
coinbaseMaturity int64 = 100
// zeroHash is the zero value for a btcwire.ShaHash and is defined as // zeroHash is the zero value for a btcwire.ShaHash and is defined as
// a package level variable to avoid the need to create a new instance // a package level variable to avoid the need to create a new instance