From c6d50b7abfe5f43c60718398e12606d219725a57 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Mon, 22 Aug 2016 18:04:27 -0700 Subject: [PATCH] rpctest: ensure the main harness rejects non-standard transactions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit modifies the current set of integration tests to ensure that that the main harness always rejects non-standard transactions. With this in place, even though we’re using simnet parameters, we ensure that transaction acceptance/validation is identical to that of main net. --- rpcserver_test.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/rpcserver_test.go b/rpcserver_test.go index 225ac7d33..49e863421 100644 --- a/rpcserver_test.go +++ b/rpcserver_test.go @@ -101,7 +101,12 @@ var primaryHarness *rpctest.Harness func TestMain(m *testing.M) { var err error - primaryHarness, err = rpctest.New(&chaincfg.SimNetParams, nil, nil) + + // In order to properly test scenarios on as if we were on mainnet, + // ensure that non-standard transactions aren't accepted into the + // mempool or relayed. + btcdCfg := []string{"--rejectnonstd"} + primaryHarness, err = rpctest.New(&chaincfg.SimNetParams, nil, btcdCfg) if err != nil { fmt.Println("unable to create primary harness: ", err) os.Exit(1)