mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-17 17:33:47 +00:00
Minor changes (formatting, no t.Parallel())
This commit is contained in:
parent
2487e925b0
commit
6ac627914b
1 changed files with 3 additions and 5 deletions
|
|
@ -327,10 +327,9 @@ func TestCopyHeader(t *testing.T) {
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
|
|
||||||
t.Run("empty_header", func(t *testing.T) {
|
t.Run("empty_header", func(t *testing.T) {
|
||||||
t.Parallel()
|
empty := &Header{}
|
||||||
|
|
||||||
empty := Header{}
|
cpy := CopyHeader(empty)
|
||||||
cpy := CopyHeader(&empty)
|
|
||||||
|
|
||||||
want := &Header{
|
want := &Header{
|
||||||
Difficulty: new(big.Int),
|
Difficulty: new(big.Int),
|
||||||
|
|
@ -340,8 +339,6 @@ func TestCopyHeader(t *testing.T) {
|
||||||
})
|
})
|
||||||
|
|
||||||
t.Run("filled_header", func(t *testing.T) {
|
t.Run("filled_header", func(t *testing.T) {
|
||||||
t.Parallel()
|
|
||||||
|
|
||||||
h := &Header{
|
h := &Header{
|
||||||
ParentHash: common.Hash{1},
|
ParentHash: common.Hash{1},
|
||||||
UncleHash: common.Hash{2},
|
UncleHash: common.Hash{2},
|
||||||
|
|
@ -393,6 +390,7 @@ func TestCopyHeader(t *testing.T) {
|
||||||
ParentBeaconRoot: &common.Hash{20},
|
ParentBeaconRoot: &common.Hash{20},
|
||||||
RequestsHash: &common.Hash{21},
|
RequestsHash: &common.Hash{21},
|
||||||
}
|
}
|
||||||
|
|
||||||
assert.Equal(t, want, cpy)
|
assert.Equal(t, want, cpy)
|
||||||
|
|
||||||
// Mutate each non-value field to ensure they are not shared
|
// Mutate each non-value field to ensure they are not shared
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue