Skip to content

Commit

Permalink
check fee polyproxy check
Browse files Browse the repository at this point in the history
  • Loading branch information
rain-zxn committed Sep 24, 2021
1 parent 74f2a77 commit fda067b
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions http/mysql.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package http

import (
"fmt"
"github.com/beego/beego/v2/core/logs"
"poly-bridge/basedef"
"poly-bridge/conf"
"strings"
Expand All @@ -45,9 +46,15 @@ func Init() {
panic(err)
}

proxyMap := make(map[string]bool, 0)
proxyConfigs := conf.GlobalConfig.ChainListenConfig
for _, v := range proxyConfigs {
polyProxy[strings.ToUpper(v.ProxyContract)] = true
polyProxy[strings.ToUpper(basedef.HexStringReverse(v.ProxyContract))] = true
proxyMap[strings.ToUpper(v.ProxyContract)] = true
proxyMap[strings.ToUpper(basedef.HexStringReverse(v.ProxyContract))] = true
}
polyProxy = proxyMap
if len(polyProxy) == 0 {
panic("http init polyProxy err,polyProxy is nil")
}
logs.Info("http init polyProxy:", polyProxy)
}

0 comments on commit fda067b

Please sign in to comment.