Skip to content

Commit ee68dc6

Browse files
authored
btcec+mempool: delete minor unreachable code caused by t.Fatal
Signed-off-by: Abirdcfly <[email protected]>
1 parent b513ac2 commit ee68dc6

File tree

2 files changed

+0
-5
lines changed

2 files changed

+0
-5
lines changed

btcec/btcec_test.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -651,14 +651,12 @@ func TestScalarMultRand(t *testing.T) {
651651
_, err := rand.Read(data)
652652
if err != nil {
653653
t.Fatalf("failed to read random data at %d", i)
654-
break
655654
}
656655
x, y = s256.ScalarMult(x, y, data)
657656
exponent.Mul(exponent, new(big.Int).SetBytes(data))
658657
xWant, yWant := s256.ScalarBaseMult(exponent.Bytes())
659658
if x.Cmp(xWant) != 0 || y.Cmp(yWant) != 0 {
660659
t.Fatalf("%d: bad output for %X: got (%X, %X), want (%X, %X)", i, data, x, y, xWant, yWant)
661-
break
662660
}
663661
}
664662
}
@@ -814,7 +812,6 @@ func TestSplitKRand(t *testing.T) {
814812
_, err := rand.Read(bytesK)
815813
if err != nil {
816814
t.Fatalf("failed to read random data at %d", i)
817-
break
818815
}
819816
k := new(big.Int).SetBytes(bytesK)
820817
k1, k2, k1Sign, k2Sign := splitK(bytesK)

mempool/policy_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,6 @@ func TestCheckPkScriptStandard(t *testing.T) {
190190
if err != nil {
191191
t.Fatalf("TestCheckPkScriptStandard test '%s' "+
192192
"failed: %v", test.name, err)
193-
continue
194193
}
195194
scriptClass := txscript.GetScriptClass(script)
196195
got := checkPkScriptStandard(script, scriptClass)
@@ -272,7 +271,6 @@ func TestDust(t *testing.T) {
272271
if res != test.isDust {
273272
t.Fatalf("Dust test '%s' failed: want %v got %v",
274273
test.name, test.isDust, res)
275-
continue
276274
}
277275
}
278276
}

0 commit comments

Comments
 (0)