Skip to content

Commit

Permalink
update log
Browse files Browse the repository at this point in the history
  • Loading branch information
yihuang committed Feb 26, 2024
1 parent e92fd92 commit ee3c41b
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions app/app.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package app

import (
"crypto/sha256"
"encoding/hex"
"errors"
"fmt"
"io"
Expand Down Expand Up @@ -800,9 +802,21 @@ func New(

// use Ethermint's custom AnteHandler
func (app *App) setAnteHandler(txConfig client.TxConfig, maxGasWanted uint64, blacklist []string) {
app.Logger().Info("Setting ante handler with blacklist", "size", len(blacklist))
for _, addr := range blacklist {
app.Logger().Info("Blacklisted address", "address", addr)
if len(blacklist) > 0 {
// hash blacklist concatenated
h := sha256.New()
for _, addr := range blacklist {
_, err := h.Write([]byte(addr))
if err != nil {
panic(err)
}
}
app.Logger().Info("Setting ante handler with blacklist", "size", len(blacklist), "hash", hex.EncodeToString(h.Sum(nil)))
for _, addr := range blacklist {
app.Logger().Info("Blacklisted address", "address", addr)
}
} else {
app.Logger().Info("Setting ante handler without blacklist")
}
anteHandler, err := evmante.NewAnteHandler(evmante.HandlerOptions{
AccountKeeper: app.AccountKeeper,
Expand Down

0 comments on commit ee3c41b

Please sign in to comment.