OSDN Git Service
(root)
/
bytom
/
vapor.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2639865
)
convert assetID to lower-case
author
HAOYUatHZ
<haoyu@protonmail.com>
Sat, 15 Feb 2020 10:19:24 +0000
(18:19 +0800)
committer
HAOYUatHZ
<haoyu@protonmail.com>
Sat, 15 Feb 2020 10:19:24 +0000
(18:19 +0800)
protocol/asset_filter.go
patch
|
blob
|
history
diff --git
a/protocol/asset_filter.go
b/protocol/asset_filter.go
index
e299f01
..
1cf51f8
100644
(file)
--- a/
protocol/asset_filter.go
+++ b/
protocol/asset_filter.go
@@
-14,8
+14,8
@@
type assetFilter struct {
func NewAssetFilter(whitelist string) *assetFilter {
af := &assetFilter{whitelist: make(map[string]struct{})}
af.whitelist[consensus.BTMAssetID.String()] = struct{}{}
- for _, asset := range strings.Split(whitelist, ",") {
- af.whitelist[
asset
] = struct{}{}
+ for _, asset
ID
:= range strings.Split(whitelist, ",") {
+ af.whitelist[
strings.ToLower(assetID)
] = struct{}{}
}
return af
}