Skip to content

Commit

Permalink
btcec+mempool: delete minor unreachable code caused by t.Fatal
Browse files Browse the repository at this point in the history
Signed-off-by: Abirdcfly <[email protected]>
  • Loading branch information
Abirdcfly authored Oct 8, 2024
1 parent b513ac2 commit ee68dc6
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 5 deletions.
3 changes: 0 additions & 3 deletions btcec/btcec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
}
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 0 additions & 2 deletions mempool/policy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
}
}
}
Expand Down

0 comments on commit ee68dc6

Please sign in to comment.