aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Boyer <tech@samboyer.org>2014-02-19 06:20:41 +0800
committerSam Boyer <tech@samboyer.org>2014-02-19 06:20:41 +0800
commit5adbd399463edc5ec800bdcf3524d64313c8add5 (patch)
tree2001ca81138e1ff233d2bb46ae4fbba8c78f8f31
parentbbcf304b99b6bc9e2a2a8f49cda5e5b77917dd0a (diff)
downloadgo-tangerine-5adbd399463edc5ec800bdcf3524d64313c8add5.tar
go-tangerine-5adbd399463edc5ec800bdcf3524d64313c8add5.tar.gz
go-tangerine-5adbd399463edc5ec800bdcf3524d64313c8add5.tar.bz2
go-tangerine-5adbd399463edc5ec800bdcf3524d64313c8add5.tar.lz
go-tangerine-5adbd399463edc5ec800bdcf3524d64313c8add5.tar.xz
go-tangerine-5adbd399463edc5ec800bdcf3524d64313c8add5.tar.zst
go-tangerine-5adbd399463edc5ec800bdcf3524d64313c8add5.zip
Express bit flag constants using iota bitshift.
-rw-r--r--peer.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/peer.go b/peer.go
index 53fdfa8fc..e64b5b3bd 100644
--- a/peer.go
+++ b/peer.go
@@ -56,9 +56,9 @@ func (d DiscReason) String() string {
type Caps byte
const (
- CapPeerDiscTy = 0x01
- CapTxTy = 0x02
- CapChainTy = 0x04
+ CapPeerDiscTy = 1 << iota
+ CapTxTy
+ CapChainTy
CapDefault = CapChainTy | CapTxTy | CapPeerDiscTy
)