mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 21:31:37 +00:00
Co-authored-by: Martin Holst Swende <martin@swende.se>
This commit is contained in:
parent
1dc8158ef0
commit
87ed24a113
3 changed files with 5 additions and 6 deletions
|
|
@ -946,7 +946,7 @@ func TestOOMMaliciousInput(t *testing.T) {
|
|||
}
|
||||
encb, err := hex.DecodeString(test.enc)
|
||||
if err != nil {
|
||||
t.Fatalf("invalid hex: %s" + test.enc)
|
||||
t.Fatalf("invalid hex: %s", test.enc)
|
||||
}
|
||||
_, err = abi.Methods["method"].Outputs.UnpackValues(encb)
|
||||
if err == nil {
|
||||
|
|
|
|||
|
|
@ -338,10 +338,10 @@ func TestBlockReceiptStorage(t *testing.T) {
|
|||
// Insert the receipt slice into the database and check presence
|
||||
WriteReceipts(db, hash, 0, receipts)
|
||||
if rs := ReadReceipts(db, hash, 0, params.TestChainConfig); len(rs) == 0 {
|
||||
t.Fatalf("no receipts returned")
|
||||
t.Fatal("no receipts returned")
|
||||
} else {
|
||||
if err := checkReceiptsRLP(rs, receipts); err != nil {
|
||||
t.Fatalf("fail to checkReceiptsRLP %v", err)
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
// Delete the body and ensure that the receipts are no longer returned (metadata can't be recomputed)
|
||||
|
|
@ -351,7 +351,7 @@ func TestBlockReceiptStorage(t *testing.T) {
|
|||
}
|
||||
// Ensure that receipts without metadata can be returned without the block body too
|
||||
if err := checkReceiptsRLP(ReadRawReceipts(db, hash, 0), receipts); err != nil {
|
||||
t.Fatalf("fail to checkReceiptsRLP %v", err)
|
||||
t.Fatal(err)
|
||||
}
|
||||
// Sanity check that body alone without the receipt is a full purge
|
||||
WriteBody(db, hash, 0, body)
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@
|
|||
package flags
|
||||
|
||||
import (
|
||||
"os"
|
||||
"os/user"
|
||||
"runtime"
|
||||
"testing"
|
||||
|
|
@ -51,7 +50,7 @@ func TestPathExpansion(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
os.Setenv(`DDDXXX`, `/tmp`)
|
||||
t.Setenv(`DDDXXX`, `/tmp`)
|
||||
for test, expected := range tests {
|
||||
got := expandPath(test)
|
||||
if got != expected {
|
||||
|
|
|
|||
Loading…
Reference in a new issue