@@ -63,6 +63,7 @@ func TestStateAccountExtraViaTrieStorage(t *testing.T) {
6363 {
6464 name : "vanilla geth" ,
6565 registerAndSetExtra : func (a * types.StateAccount ) (* types.StateAccount , assertion ) {
66+ //nolint:thelper // It's more useful if this test failure shows this line instead of its call site
6667 return a , func (t * testing.T , got * types.StateAccount ) {
6768 assert .Truef (t , a .Extra .Equal (nil ), "%T.%T.IsEmpty()" , a , a .Extra )
6869 }
@@ -74,7 +75,7 @@ func TestStateAccountExtraViaTrieStorage(t *testing.T) {
7475 registerAndSetExtra : func (a * types.StateAccount ) (* types.StateAccount , assertion ) {
7576 e := types .RegisterExtras [bool ]()
7677 e .SetOnPayloadCarrier (a , true )
77- return a , func (t * testing.T , got * types.StateAccount ) {
78+ return a , func (t * testing.T , got * types.StateAccount ) { //nolint:thelper
7879 assert .Truef (t , e .FromPayloadCarrier (got ), "" )
7980 }
8081 },
@@ -85,7 +86,8 @@ func TestStateAccountExtraViaTrieStorage(t *testing.T) {
8586 registerAndSetExtra : func (a * types.StateAccount ) (* types.StateAccount , assertion ) {
8687 e := types .RegisterExtras [bool ]()
8788 e .SetOnPayloadCarrier (a , false ) // the explicit part
88- return a , func (t * testing.T , got * types.StateAccount ) {
89+
90+ return a , func (t * testing.T , got * types.StateAccount ) { //nolint:thelper
8991 assert .Falsef (t , e .FromPayloadCarrier (got ), "" )
9092 }
9193 },
@@ -96,7 +98,7 @@ func TestStateAccountExtraViaTrieStorage(t *testing.T) {
9698 registerAndSetExtra : func (a * types.StateAccount ) (* types.StateAccount , assertion ) {
9799 e := types .RegisterExtras [bool ]()
98100 // Note that `a` is reflected, unchanged (the implicit part).
99- return a , func (t * testing.T , got * types.StateAccount ) {
101+ return a , func (t * testing.T , got * types.StateAccount ) { //nolint:thelper
100102 assert .Falsef (t , e .FromPayloadCarrier (got ), "" )
101103 }
102104 },
@@ -108,7 +110,7 @@ func TestStateAccountExtraViaTrieStorage(t *testing.T) {
108110 e := types .RegisterExtras [arbitraryPayload ]()
109111 p := arbitraryPayload {arbitraryData }
110112 e .SetOnPayloadCarrier (a , p )
111- return a , func (t * testing.T , got * types.StateAccount ) {
113+ return a , func (t * testing.T , got * types.StateAccount ) { //nolint:thelper
112114 assert .Equalf (t , arbitraryPayload {arbitraryData }, e .FromPayloadCarrier (got ), "" )
113115 }
114116 },
0 commit comments