Skip to content

Commit fd45595

Browse files
committed
Log submitted TX hash and nonce on info level
This log should not be hidden on debug level, it's too important to be there.
1 parent db51d7a commit fd45595

2 files changed

Lines changed: 18 additions & 4 deletions

File tree

tools/generators/ethereum/contract_non_const_methods.go.tmpl

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,10 @@ func ({{$contract.ShortVar}} *{{$contract.Class}}) {{$method.CapsName}}(
6767
)
6868
}
6969

70-
{{$logger}}.Debugf(
71-
"submitted transaction {{$method.LowerName}} with id: [%v]",
70+
{{$logger}}.Infof(
71+
"submitted transaction {{$method.LowerName}} with id: [%v] and nonce [%v]",
7272
transaction.Hash().Hex(),
73+
transaction.Nonce(),
7374
)
7475

7576
go {{$contract.ShortVar}}.miningWaiter.ForceMining(
@@ -96,6 +97,12 @@ func ({{$contract.ShortVar}} *{{$contract.Class}}) {{$method.CapsName}}(
9697
)
9798
}
9899

100+
{{$logger}}.Infof(
101+
"submitted transaction {{$method.LowerName}} with id: [%v] and nonce [%v]",
102+
transaction.Hash().Hex(),
103+
transaction.Nonce(),
104+
)
105+
99106
return transaction, nil
100107
},
101108
)

tools/generators/ethereum/contract_non_const_methods_template_content.go

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,10 @@ func ({{$contract.ShortVar}} *{{$contract.Class}}) {{$method.CapsName}}(
7070
)
7171
}
7272
73-
{{$logger}}.Debugf(
74-
"submitted transaction {{$method.LowerName}} with id: [%v]",
73+
{{$logger}}.Infof(
74+
"submitted transaction {{$method.LowerName}} with id: [%v] and nonce [%v]",
7575
transaction.Hash().Hex(),
76+
transaction.Nonce(),
7677
)
7778
7879
go {{$contract.ShortVar}}.miningWaiter.ForceMining(
@@ -99,6 +100,12 @@ func ({{$contract.ShortVar}} *{{$contract.Class}}) {{$method.CapsName}}(
99100
)
100101
}
101102
103+
{{$logger}}.Infof(
104+
"submitted transaction {{$method.LowerName}} with id: [%v] and nonce [%v]",
105+
transaction.Hash().Hex(),
106+
transaction.Nonce(),
107+
)
108+
102109
return transaction, nil
103110
},
104111
)

0 commit comments

Comments
 (0)