github.com/aergoio/aergo@v1.3.1/p2p/p2pcommon/txnotice.go (about)

     1  /*
     2   * @file
     3   * @copyright defined in aergo/LICENSE.txt
     4   */
     5  
     6  package p2pcommon
     7  
     8  import (
     9  	"github.com/aergoio/aergo/types"
    10  )
    11  
    12  type TxNoticeTracer interface {
    13  	RegisterTxNotice(txIDs []types.TxID, cnt int, alreadySent []types.PeerID)
    14  	ReportSend(txIDs []types.TxID, peerID types.PeerID)
    15  	ReportNotSend(txIDs []types.TxID, cnt int)
    16  }
    17  //go:generate mockgen -source=txnotice.go  -package=p2pmock -destination=../p2pmock/mock_txnotice.go
    18  
    19  type ReportType int
    20  
    21  const (
    22  	Send ReportType = iota
    23  	Fail
    24  	Skip
    25  )