Skip to content

Commit

Permalink
Merge pull request #121 from rain-zxn/master
Browse files Browse the repository at this point in the history
check fee polyproxy check
  • Loading branch information
rain-zxn committed Sep 24, 2021
2 parents 232d83c + fda067b commit ace09e7
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 ace09e7

Please sign in to comment.