mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-18 22:14:35 +00:00
Merge branch 'master' into marko/int64-
This commit is contained in:
@@ -77,8 +77,9 @@ func TestValidator_Propose(t *testing.T) {
|
||||
|
||||
require.False(t, proposeCount == 0 && expectCount > 0,
|
||||
"node did not propose any blocks (expected %v)", expectCount)
|
||||
require.Less(t, expectCount-proposeCount, 5,
|
||||
"validator missed proposing too many blocks (proposed %v out of %v)", proposeCount, expectCount)
|
||||
if expectCount > 5 {
|
||||
require.GreaterOrEqual(t, proposeCount, 3, "validator didn't propose even 3 blocks")
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -116,8 +117,9 @@ func TestValidator_Sign(t *testing.T) {
|
||||
|
||||
require.False(t, signCount == 0 && expectCount > 0,
|
||||
"validator did not sign any blocks (expected %v)", expectCount)
|
||||
require.Less(t, float64(expectCount-signCount)/float64(expectCount), 0.33,
|
||||
"validator missed signing too many blocks (signed %v out of %v)", signCount, expectCount)
|
||||
if expectCount > 7 {
|
||||
require.GreaterOrEqual(t, signCount, 3, "validator didn't sign even 3 blocks (expected %v)", expectCount)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -981,7 +981,7 @@ func (ps *PeerState) ToJSON() ([]byte, error) {
|
||||
|
||||
// GetHeight returns an atomic snapshot of the PeerRoundState's height
|
||||
// used by the mempool to ensure peers are caught up before broadcasting new txs
|
||||
func (ps *PeerState) GetHeight() int64 {
|
||||
func (ps *PeerState) GetHeight() uint64 {
|
||||
ps.mtx.Lock()
|
||||
defer ps.mtx.Unlock()
|
||||
return ps.PRS.Height
|
||||
|
||||
@@ -791,7 +791,7 @@ func NewNode(config *cfg.Config,
|
||||
|
||||
// TODO: Fetch and provide real options and do proper p2p bootstrapping.
|
||||
// TODO: Use a persistent peer database.
|
||||
peerMgr, err := p2p.NewPeerManager(dbm.NewMemDB(), p2p.PeerManagerOptions{})
|
||||
peerMgr, err := p2p.NewPeerManager(nodeKey.ID, dbm.NewMemDB(), p2p.PeerManagerOptions{})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user