Skip to content

Commit

Permalink
sort blacklist
Browse files Browse the repository at this point in the history
  • Loading branch information
yihuang committed Feb 26, 2024
1 parent 75eaec1 commit 07bc0d1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"net/http"
"os"
"path/filepath"
"sort"

"github.com/crypto-org-chain/cronos/x/cronos/middleware"
"golang.org/x/exp/slices"
Expand Down Expand Up @@ -803,6 +804,7 @@ func New(
// use Ethermint's custom AnteHandler
func (app *App) setAnteHandler(txConfig client.TxConfig, maxGasWanted uint64, blacklist []string) {
if len(blacklist) > 0 {
sort.Strings(blacklist)
// hash blacklist concatenated
h := sha256.New()
for _, addr := range blacklist {
Expand Down

0 comments on commit 07bc0d1

Please sign in to comment.