mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-24 08:49:29 +00:00
minor
This commit is contained in:
parent
2e9e14238d
commit
e60974955d
1 changed files with 5 additions and 5 deletions
|
|
@ -446,20 +446,20 @@ func TestDetectLayoutNoReceipts(t *testing.T) {
|
||||||
t.Fatalf("From: %v", err)
|
t.Fatalf("From: %v", err)
|
||||||
}
|
}
|
||||||
defer e.Close()
|
defer e.Close()
|
||||||
era := e.(*Era)
|
ere := e.(*Era)
|
||||||
|
|
||||||
if era.HasComponent(receipts) {
|
if ere.HasComponent(receipts) {
|
||||||
t.Errorf("receipts should not be reported as present in synthetic noreceipts file")
|
t.Errorf("receipts should not be reported as present in synthetic noreceipts file")
|
||||||
}
|
}
|
||||||
if !era.HasComponent(td) {
|
if !ere.HasComponent(td) {
|
||||||
t.Errorf("td should be reported as present")
|
t.Errorf("td should be reported as present")
|
||||||
}
|
}
|
||||||
if got, want := era.m.layout[td], 2; got != want {
|
if got, want := ere.m.layout[td], 2; got != want {
|
||||||
t.Errorf("td slot: want %d, got %d", want, got)
|
t.Errorf("td slot: want %d, got %d", want, got)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reading receipts must fail loudly, not silently decode TD bytes.
|
// Reading receipts must fail loudly, not silently decode TD bytes.
|
||||||
if _, err := era.GetRawReceiptsByNumber(0); err == nil {
|
if _, err := ere.GetRawReceiptsByNumber(0); err == nil {
|
||||||
t.Error("expected error when reading receipts from a noreceipts file")
|
t.Error("expected error when reading receipts from a noreceipts file")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue