Fixes to stability tests: Move orphans test to simnet + Change fakePublicKeyHash size to 32 bytes (#1630)

* Move orphans test to simnet

* Change fakePublicKeyHash size to correct one
This commit is contained in:
Svarog 2021-03-25 12:04:41 +02:00 committed by GitHub
parent 6ec0a8a559
commit 3959bc1e7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -15,6 +15,7 @@ import (
"github.com/kaspanet/kaspad/util"
"github.com/kaspanet/kaspad/util/panics"
"github.com/pkg/errors"
"golang.org/x/crypto/blake2b"
)
const (
@ -177,7 +178,7 @@ func useDirOrCreateTemp(dataDir, tempName string) (string, error) {
}
func mineOnTips(client *rpc.Client) (appmessage.RejectReason, error) {
fakePublicKeyHash := make([]byte, 20)
fakePublicKeyHash := make([]byte, blake2b.Size256)
addr, err := util.NewAddressPubKeyHash(fakePublicKeyHash, activeConfig().NetParams().Prefix)
if err != nil {
return appmessage.RejectReasonNone, err

View File

@ -1,12 +1,12 @@
#!/bin/bash
rm -rf /tmp/kaspad-temp
kaspad --devnet --appdir=/tmp/kaspad-temp --profile=6061 &
kaspad --simnet --appdir=/tmp/kaspad-temp --profile=6061 &
KASPAD_PID=$!
sleep 1
orphans --devnet -alocalhost:16611 -n20 --profile=7000
orphans --simnet -alocalhost:16511 -n20 --profile=7000
TEST_EXIT_CODE=$?
kill $KASPAD_PID