OSDN Git Service
(root)
/
bytom
/
vapor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add p2p security module (#143)
[bytom/vapor.git]
/
netsync
/
consensusmgr
/
block_fetcher.go
diff --git
a/netsync/consensusmgr/block_fetcher.go
b/netsync/consensusmgr/block_fetcher.go
index
3b6c746
..
dc42923
100644
(file)
--- a/
netsync/consensusmgr/block_fetcher.go
+++ b/
netsync/consensusmgr/block_fetcher.go
@@
-5,6
+5,7
@@
import (
"gopkg.in/karalabe/cookiejar.v2/collections/prque"
"github.com/vapor/netsync/peers"
"gopkg.in/karalabe/cookiejar.v2/collections/prque"
"github.com/vapor/netsync/peers"
+ "github.com/vapor/p2p/security"
"github.com/vapor/protocol/bc"
)
"github.com/vapor/protocol/bc"
)
@@
-80,7
+81,7
@@
func (f *blockFetcher) insert(msg *blockMsg) {
return
}
return
}
- f.peers.
AddBanScore(msg.peerID, 20, 0
, err.Error())
+ f.peers.
ProcessIllegal(msg.peerID, security.LevelMsgIllegal
, err.Error())
return
}
return
}