mirror of
https://github.com/btcsuite/btcd.git
synced 2024-11-19 01:40:07 +01:00
btcec+mempool: delete minor unreachable code caused by t.Fatal
Signed-off-by: Abirdcfly <fp544037857@gmail.com>
This commit is contained in:
parent
b513ac2da7
commit
ee68dc66a8
@ -651,14 +651,12 @@ func TestScalarMultRand(t *testing.T) {
|
||||
_, err := rand.Read(data)
|
||||
if err != nil {
|
||||
t.Fatalf("failed to read random data at %d", i)
|
||||
break
|
||||
}
|
||||
x, y = s256.ScalarMult(x, y, data)
|
||||
exponent.Mul(exponent, new(big.Int).SetBytes(data))
|
||||
xWant, yWant := s256.ScalarBaseMult(exponent.Bytes())
|
||||
if x.Cmp(xWant) != 0 || y.Cmp(yWant) != 0 {
|
||||
t.Fatalf("%d: bad output for %X: got (%X, %X), want (%X, %X)", i, data, x, y, xWant, yWant)
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -814,7 +812,6 @@ func TestSplitKRand(t *testing.T) {
|
||||
_, err := rand.Read(bytesK)
|
||||
if err != nil {
|
||||
t.Fatalf("failed to read random data at %d", i)
|
||||
break
|
||||
}
|
||||
k := new(big.Int).SetBytes(bytesK)
|
||||
k1, k2, k1Sign, k2Sign := splitK(bytesK)
|
||||
|
@ -190,7 +190,6 @@ func TestCheckPkScriptStandard(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatalf("TestCheckPkScriptStandard test '%s' "+
|
||||
"failed: %v", test.name, err)
|
||||
continue
|
||||
}
|
||||
scriptClass := txscript.GetScriptClass(script)
|
||||
got := checkPkScriptStandard(script, scriptClass)
|
||||
@ -272,7 +271,6 @@ func TestDust(t *testing.T) {
|
||||
if res != test.isDust {
|
||||
t.Fatalf("Dust test '%s' failed: want %v got %v",
|
||||
test.name, test.isDust, res)
|
||||
continue
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user