lint fixes (#1717)

This commit is contained in:
Alex Sharov 2021-04-13 21:48:20 +07:00 committed by GitHub
parent acf1118300
commit e473e0b4d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 0 deletions

View File

@ -44,3 +44,6 @@ issues:
- gosec
- unused
- deadcode
- path: metrics/sample\.go
linters:
- gosec

View File

@ -239,6 +239,7 @@ func (so *stateObject) setState(key *common.Hash, value uint256.Int) {
// updateTrie writes cached storage modifications into the object's storage trie.
func (so *stateObject) updateTrie(ctx context.Context, stateWriter StateWriter) error {
for key, value := range so.dirtyStorage {
value := value
original := so.blockOriginStorage[key]
so.originStorage[key] = value
if err := stateWriter.WriteAccountStorage(ctx, so.address, so.data.GetIncarnation(), &key, &original, &value); err != nil {

View File

@ -280,6 +280,7 @@ func (api *PublicFilterAPI) Logs(ctx context.Context, crit FilterCriteria) (*rpc
select {
case logs := <-matchedLogs:
for _, log := range logs {
log := log
notifier.Notify(rpcSub.ID, &log)
}
case <-rpcSub.Err(): // client send an unsubscribe request