rpctest: ensure the main harness rejects non-standard transactions

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.
This commit is contained in:
Olaoluwa Osuntokun 2016-08-22 18:04:27 -07:00
parent 815ded348e
commit c6d50b7abf
No known key found for this signature in database
GPG key ID: 9CC5B105D03521A2

View file

@ -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)