core: fix lint

This commit is contained in:
Gary Rong 2024-10-31 11:18:56 +08:00
parent 8273f7c3f3
commit 91d0fd3c13

View file

@ -773,7 +773,7 @@ func TestProcessVerkleInvalidContractCreation(t *testing.T) {
t.Fatalf("nil new value in BLOCKHASH contract insert") t.Fatalf("nil new value in BLOCKHASH contract insert")
} }
if *stemStateDiff.SuffixDiffs[0].NewValue != chain[0].Hash() { if *stemStateDiff.SuffixDiffs[0].NewValue != chain[0].Hash() {
t.Fatalf("invalid BLOCKHASH value: %x != %x", *&stemStateDiff.SuffixDiffs[0].NewValue, chain[0].Hash()) t.Fatalf("invalid BLOCKHASH value: %x != %x", *stemStateDiff.SuffixDiffs[0].NewValue, chain[0].Hash())
} }
} else { } else {
// For all other entries present in the witness, check that nothing beyond // For all other entries present in the witness, check that nothing beyond
@ -878,7 +878,7 @@ func TestProcessVerkleContractWithEmptyCode(t *testing.T) {
t.Fatalf("nil new value in BLOCKHASH contract insert") t.Fatalf("nil new value in BLOCKHASH contract insert")
} }
if *stemStateDiff.SuffixDiffs[0].NewValue != chain[0].Hash() { if *stemStateDiff.SuffixDiffs[0].NewValue != chain[0].Hash() {
t.Fatalf("invalid BLOCKHASH value: %x != %x", *&stemStateDiff.SuffixDiffs[0].NewValue, chain[0].Hash()) t.Fatalf("invalid BLOCKHASH value: %x != %x", *stemStateDiff.SuffixDiffs[0].NewValue, chain[0].Hash())
} }
} else { } else {
for _, suffixDiff := range stemStateDiff.SuffixDiffs { for _, suffixDiff := range stemStateDiff.SuffixDiffs {
@ -1078,7 +1078,7 @@ func TestProcessVerkleBalanceOpcode(t *testing.T) {
} }
// check the prestate balance wasn't 0 or missing // check the prestate balance wasn't 0 or missing
if balanceStateDiff.CurrentValue == nil || *balanceStateDiff.CurrentValue == zero { if balanceStateDiff.CurrentValue == nil || *balanceStateDiff.CurrentValue == zero {
t.Fatalf("invalid current value %v", *&balanceStateDiff.CurrentValue) t.Fatalf("invalid current value %v", *balanceStateDiff.CurrentValue)
} }
// check that the poststate witness value for the balance is nil, // check that the poststate witness value for the balance is nil,
// meaning that it didn't get updated. // meaning that it didn't get updated.