Resets params registry when each test is done

This commit is contained in:
Jakub Matys 2018-10-03 11:35:48 +02:00
parent 09f86006ce
commit 23f111d1dc

View File

@ -15,6 +15,8 @@ import (
"path/filepath"
"reflect"
"testing"
"github.com/jakm/btcutil/chaincfg"
)
type TestFunc func(t *testing.T, coin string, chain bchain.BlockChain, testConfig json.RawMessage)
@ -52,6 +54,7 @@ func runTests(t *testing.T, coin string, cfg map[string]json.RawMessage) {
if cfg == nil || len(cfg) == 0 {
t.Skip("No tests to run")
}
defer chaincfg.ResetParams()
bc, err := makeBlockChain(coin)
if err != nil {