@@ -43,8 +43,8 @@ object Blacklist {
43
43
val group = " RegularSyncBlacklistGroup"
44
44
}
45
45
// this group is directly translated from WireProtocol
46
- trait Peer2PeerBlacklistGroup {
47
- val group = " Peer2PeerBlacklistGroup "
46
+ trait P2PBlacklistGroup {
47
+ val group = " P2PBlacklistGroup "
48
48
}
49
49
}
50
50
@@ -103,51 +103,51 @@ object Blacklist {
103
103
val code : Int = 12
104
104
val name : String = " PivotBlockElectionTimeout"
105
105
}
106
- case object DisconnectRequestedType extends BlacklistReasonType with Peer2PeerBlacklistGroup {
106
+ case object DisconnectRequestedType extends BlacklistReasonType with P2PBlacklistGroup {
107
107
val code : Int = 13
108
108
val name : String = " DisconnectRequested"
109
109
}
110
- case object TcpSubsystemErrorType extends BlacklistReasonType with Peer2PeerBlacklistGroup {
110
+ case object TcpSubsystemErrorType extends BlacklistReasonType with P2PBlacklistGroup {
111
111
val code : Int = 14
112
112
val name : String = " TcpSubsystemError"
113
113
}
114
- case object UselessPeerType extends BlacklistReasonType with Peer2PeerBlacklistGroup {
114
+ case object UselessPeerType extends BlacklistReasonType with P2PBlacklistGroup {
115
115
val code : Int = 15
116
116
val name : String = " UselessPeer"
117
117
}
118
- case object TooManyPeersType extends BlacklistReasonType with Peer2PeerBlacklistGroup {
118
+ case object TooManyPeersType extends BlacklistReasonType with P2PBlacklistGroup {
119
119
val code : Int = 16
120
120
val name : String = " TooManyPeers"
121
121
}
122
- case object AlreadyConnectedType extends BlacklistReasonType with Peer2PeerBlacklistGroup {
122
+ case object AlreadyConnectedType extends BlacklistReasonType with P2PBlacklistGroup {
123
123
val code : Int = 17
124
124
val name : String = " AlreadyConnected"
125
125
}
126
- case object IncompatibleP2pProtocolVersionType extends BlacklistReasonType with Peer2PeerBlacklistGroup {
126
+ case object IncompatibleP2pProtocolVersionType extends BlacklistReasonType with P2PBlacklistGroup {
127
127
val code : Int = 18
128
128
val name : String = " IncompatibleP2pProtocolVersion"
129
129
}
130
- case object NullNodeIdentityReceivedType extends BlacklistReasonType with Peer2PeerBlacklistGroup {
130
+ case object NullNodeIdentityReceivedType extends BlacklistReasonType with P2PBlacklistGroup {
131
131
val code : Int = 19
132
132
val name : String = " NullNodeIdentityReceived"
133
133
}
134
- case object ClientQuittingType extends BlacklistReasonType with Peer2PeerBlacklistGroup {
134
+ case object ClientQuittingType extends BlacklistReasonType with P2PBlacklistGroup {
135
135
val code : Int = 20
136
136
val name : String = " ClientQuitting"
137
137
}
138
- case object UnexpectedIdentityType extends BlacklistReasonType with Peer2PeerBlacklistGroup {
138
+ case object UnexpectedIdentityType extends BlacklistReasonType with P2PBlacklistGroup {
139
139
val code : Int = 21
140
140
val name : String = " UnexpectedIdentity"
141
141
}
142
- case object IdentityTheSameType extends BlacklistReasonType with Peer2PeerBlacklistGroup {
142
+ case object IdentityTheSameType extends BlacklistReasonType with P2PBlacklistGroup {
143
143
val code : Int = 22
144
144
val name : String = " IdentityTheSame"
145
145
}
146
- case object TimeoutOnReceivingAMessageType extends BlacklistReasonType with Peer2PeerBlacklistGroup {
146
+ case object TimeoutOnReceivingAMessageType extends BlacklistReasonType with P2PBlacklistGroup {
147
147
val code : Int = 23
148
148
val name : String = " TimeoutOnReceivingAMessage"
149
149
}
150
- case object OtherSubprotocolSpecificReasonType extends BlacklistReasonType with Peer2PeerBlacklistGroup {
150
+ case object OtherSubprotocolSpecificReasonType extends BlacklistReasonType with P2PBlacklistGroup {
151
151
val code : Int = 24
152
152
val name : String = " OtherSubprotocolSpecificReason"
153
153
}
@@ -290,7 +290,7 @@ object Blacklist {
290
290
val description : String = s " Block import error: $error"
291
291
}
292
292
293
- private val allPeer2PeerReasons = List (
293
+ private val allP2PReasons = List (
294
294
DisconnectRequested ,
295
295
TcpSubsystemError ,
296
296
UselessPeer ,
@@ -305,8 +305,8 @@ object Blacklist {
305
305
OtherSubprotocolSpecificReason
306
306
)
307
307
308
- def getPeer2PeerBlacklistReasonByDescription (description : String ): BlacklistReason = {
309
- allPeer2PeerReasons .find(_.description == description).getOrElse(OtherSubprotocolSpecificReason )
308
+ def getP2PBlacklistReasonByDescription (description : String ): BlacklistReason = {
309
+ allP2PReasons .find(_.description == description).getOrElse(OtherSubprotocolSpecificReason )
310
310
}
311
311
}
312
312
}
0 commit comments