Merge remote-tracking branch 'origin/develop' into dev/refactor_crypto

This commit is contained in:
ValarDragon
2018-07-20 08:59:41 -07:00
22 changed files with 605 additions and 247 deletions
+1 -1
View File
@@ -134,7 +134,7 @@ func newBlockCallback(n *Node) em.EventCallbackFunc {
n.logger.Info("new block", "height", block.Height, "numTxs", block.NumTxs)
if n.blockCh != nil {
n.blockCh <- *block
n.blockCh <- block
}
}
}
+3 -3
View File
@@ -6,7 +6,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/tendermint/go-amino"
amino "github.com/tendermint/go-amino"
"github.com/tendermint/tendermint/crypto/ed25519"
ctypes "github.com/tendermint/tendermint/rpc/core/types"
em "github.com/tendermint/tendermint/tools/tm-monitor/eventmeter"
@@ -33,11 +33,11 @@ func TestNodeNewBlockReceived(t *testing.T) {
defer n.Stop()
n.SendBlocksTo(blockCh)
blockHeader := &tmtypes.Header{Height: 5}
blockHeader := tmtypes.Header{Height: 5}
emMock.Call("eventCallback", &em.EventMetric{}, tmtypes.EventDataNewBlockHeader{blockHeader})
assert.Equal(t, int64(5), n.Height)
assert.Equal(t, *blockHeader, <-blockCh)
assert.Equal(t, blockHeader, <-blockCh)
}
func TestNodeNewBlockLatencyReceived(t *testing.T) {