github.com/gnolang/gno@v0.0.0-20240520182011-228e9d0192ce/tm2/pkg/bft/state/eventstore/null/null.go (about)

     1  package null
     2  
     3  import (
     4  	"github.com/gnolang/gno/tm2/pkg/bft/state/eventstore"
     5  	"github.com/gnolang/gno/tm2/pkg/bft/types"
     6  )
     7  
     8  var _ eventstore.TxEventStore = (*TxEventStore)(nil)
     9  
    10  const (
    11  	EventStoreType = "none"
    12  )
    13  
    14  // TxEventStore acts as a /dev/null
    15  type TxEventStore struct{}
    16  
    17  func NewNullEventStore() *TxEventStore {
    18  	return &TxEventStore{}
    19  }
    20  
    21  func (t TxEventStore) Start() error {
    22  	return nil
    23  }
    24  
    25  func (t TxEventStore) Stop() error {
    26  	return nil
    27  }
    28  
    29  func (t TxEventStore) Append(_ types.TxResult) error {
    30  	return nil
    31  }
    32  
    33  func (t TxEventStore) GetType() string {
    34  	return EventStoreType
    35  }