From 79beb22aef5e72bebd924bc3c64dc2d64c8c2ff9 Mon Sep 17 00:00:00 2001 From: Josh Rickmar Date: Mon, 14 Apr 2014 07:59:30 -0500 Subject: [PATCH] Export CoinbaseMaturity as a const. The unexported variable is still kept so that tests may modify it. ok @davecgh --- validate.go | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/validate.go b/validate.go index a30a8ca73..d27387980 100644 --- a/validate.go +++ b/validate.go @@ -45,14 +45,17 @@ const ( // baseSubsidy is the starting subsidy amount for mined blocks. This // value is halved every SubsidyHalvingInterval blocks. baseSubsidy = 50 * btcutil.SatoshiPerBitcoin + + // CoinbaseMaturity is the number of blocks required before newly + // mined bitcoins (coinbase transactions) can be spent. + CoinbaseMaturity = 100 ) var ( - // coinbaseMaturity is the number of blocks required before newly - // mined bitcoins (coinbase transactions) can be spent. This is a - // variable as opposed to a constant because the tests need the ability - // to modify it. - coinbaseMaturity int64 = 100 + // coinbaseMaturity is the internal variable used for validating the + // spending of coinbase outputs. A variable rather than the exported + // constant is used because the tests need the ability to modify it. + coinbaseMaturity int64 = CoinbaseMaturity // 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