Merge branch 'master' into wb/add-consensus-param-internal

This commit is contained in:
William Banfield
2022-05-15 23:27:32 -04:00
committed by GitHub
46 changed files with 1386 additions and 791 deletions

View File

@@ -131,7 +131,10 @@ type EventDataNewBlock struct {
func (EventDataNewBlock) TypeTag() string { return "tendermint/event/NewBlock" }
// ABCIEvents implements the eventlog.ABCIEventer interface.
func (e EventDataNewBlock) ABCIEvents() []abci.Event { return e.ResultFinalizeBlock.Events }
func (e EventDataNewBlock) ABCIEvents() []abci.Event {
base := []abci.Event{eventWithAttr(BlockHeightKey, fmt.Sprint(e.Block.Header.Height))}
return append(base, e.ResultFinalizeBlock.Events...)
}
type EventDataNewBlockHeader struct {
Header Header `json:"header"`
@@ -144,7 +147,10 @@ type EventDataNewBlockHeader struct {
func (EventDataNewBlockHeader) TypeTag() string { return "tendermint/event/NewBlockHeader" }
// ABCIEvents implements the eventlog.ABCIEventer interface.
func (e EventDataNewBlockHeader) ABCIEvents() []abci.Event { return e.ResultFinalizeBlock.Events }
func (e EventDataNewBlockHeader) ABCIEvents() []abci.Event {
base := []abci.Event{eventWithAttr(BlockHeightKey, fmt.Sprint(e.Header.Height))}
return append(base, e.ResultFinalizeBlock.Events...)
}
type EventDataNewEvidence struct {
Evidence Evidence `json:"evidence"`
@@ -262,18 +268,17 @@ func (EventDataEvidenceValidated) TypeTag() string { return "tendermint/event/Ev
const (
// EventTypeKey is a reserved composite key for event name.
EventTypeKey = "tm.event"
// TxHashKey is a reserved key, used to specify transaction's hash.
// see EventBus#PublishEventTx
TxHashKey = "tx.hash"
// TxHeightKey is a reserved key, used to specify transaction block's height.
// see EventBus#PublishEventTx
TxHeightKey = "tx.height"
// BlockHeightKey is a reserved key used for indexing FinalizeBlock events.
BlockHeightKey = "block.height"
// EventTypeFinalizeBlock is a reserved key used for indexing FinalizeBlock events.
EventTypeFinalizeBlock = "finalize_block"
)
var (