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
(from parent 1:
487513a
)
Add network delay simulation in test (#359)
author
yahtoo
<yahtoo.ma@gmail.com>
Fri, 26 Jul 2019 09:01:29 +0000
(17:01 +0800)
committer
Paladz
<yzhu101@uottawa.ca>
Fri, 26 Jul 2019 09:01:29 +0000
(17:01 +0800)
netsync/chainmgr/tool_test.go
patch
|
blob
|
history
diff --git
a/netsync/chainmgr/tool_test.go
b/netsync/chainmgr/tool_test.go
index
b9d661f
..
63b6a2f
100644
(file)
--- a/
netsync/chainmgr/tool_test.go
+++ b/
netsync/chainmgr/tool_test.go
@@
-4,6
+4,7
@@
import (
"errors"
"math/rand"
"net"
+ "time"
"github.com/tendermint/go-wire"
"github.com/tendermint/tmlibs/flowrate"
@@
-84,6
+85,7
@@
func (p *P2PPeer) setAsync(b bool) {
func (p *P2PPeer) postMan() {
for msgBytes := range p.msgCh {
msgType, msg, _ := decodeMessage(msgBytes)
+ time.Sleep(10 * time.Millisecond)
p.remoteNode.processMsg(p.srcPeer, msgType, msg)
}
}