mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-25 17:34:36 +00:00
rename MsgAndTags to Message
This commit is contained in:
@@ -341,9 +341,9 @@ func TestEndBlockValidatorUpdates(t *testing.T) {
|
||||
|
||||
// test we threw an event
|
||||
select {
|
||||
case mt := <-updatesSub.Out():
|
||||
event, ok := mt.Msg().(types.EventDataValidatorSetUpdates)
|
||||
require.True(t, ok, "Expected event of type EventDataValidatorSetUpdates, got %T", mt.Msg())
|
||||
case msg := <-updatesSub.Out():
|
||||
event, ok := msg.Data().(types.EventDataValidatorSetUpdates)
|
||||
require.True(t, ok, "Expected event of type EventDataValidatorSetUpdates, got %T", msg.Data())
|
||||
if assert.NotEmpty(t, event.ValidatorUpdates) {
|
||||
assert.Equal(t, pubkey, event.ValidatorUpdates[0].PubKey)
|
||||
assert.EqualValues(t, 10, event.ValidatorUpdates[0].VotingPower)
|
||||
|
||||
@@ -44,13 +44,13 @@ func (is *IndexerService) OnStart() error {
|
||||
go func() {
|
||||
for {
|
||||
select {
|
||||
case mt := <-blockHeadersSub.Out():
|
||||
header := mt.Msg().(types.EventDataNewBlockHeader).Header
|
||||
case msg := <-blockHeadersSub.Out():
|
||||
header := msg.Data().(types.EventDataNewBlockHeader).Header
|
||||
batch := NewBatch(header.NumTxs)
|
||||
for i := int64(0); i < header.NumTxs; i++ {
|
||||
select {
|
||||
case mt2 := <-txsSub.Out():
|
||||
txResult := mt2.Msg().(types.EventDataTx).TxResult
|
||||
case msg2 := <-txsSub.Out():
|
||||
txResult := msg2.Data().(types.EventDataTx).TxResult
|
||||
batch.Add(&txResult)
|
||||
case <-txsSub.Cancelled():
|
||||
is.Logger.Error("Failed to index a block. txsSub was cancelled. Did the Tendermint stop?",
|
||||
|
||||
Reference in New Issue
Block a user