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:
parent
815ded348e
commit
c6d50b7abf
1 changed files with 6 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue