github.com/BlockABC/godash@v0.0.0-20191112120524-f4aa3a32c566/blockchain/internal_test.go (about) 1 // Copyright (c) 2013-2016 The btcsuite developers 2 // Copyright (c) 2016 The Dash developers 3 // Use of this source code is governed by an ISC 4 // license that can be found in the LICENSE file. 5 6 /* 7 This test file is part of the blockchain package rather than than the 8 blockchain_test package so it can bridge access to the internals to properly 9 test cases which are either not possible or can't reliably be tested via the 10 public interface. The functions are only exported while the tests are being 11 run. 12 */ 13 14 package blockchain 15 16 import ( 17 "sort" 18 "time" 19 ) 20 21 // TstSetCoinbaseMaturity makes the ability to set the coinbase maturity 22 // available to the test package. 23 func TstSetCoinbaseMaturity(maturity int32) { 24 coinbaseMaturity = maturity 25 } 26 27 // TstTimeSorter makes the internal timeSorter type available to the test 28 // package. 29 func TstTimeSorter(times []time.Time) sort.Interface { 30 return timeSorter(times) 31 } 32 33 // TstCheckSerializedHeight makes the internal checkSerializedHeight function 34 // available to the test package. 35 var TstCheckSerializedHeight = checkSerializedHeight 36 37 // TstSetMaxMedianTimeEntries makes the ability to set the maximum number of 38 // median time entries available to the test package. 39 func TstSetMaxMedianTimeEntries(val int) { 40 maxMedianTimeEntries = val 41 } 42 43 // TstCheckBlockScripts makes the internal checkBlockScripts function available 44 // to the test package. 45 var TstCheckBlockScripts = checkBlockScripts 46 47 // TstDeserializeUtxoEntry makes the internal deserializeUtxoEntry function 48 // available to the test package. 49 var TstDeserializeUtxoEntry = deserializeUtxoEntry