github.com/aergoio/aergo@v1.3.1/p2p/list/dummymanager.go (about)

     1  /*
     2   * @file
     3   * @copyright defined in aergo/LICENSE.txt
     4   */
     5  
     6  package list
     7  
     8  import (
     9  	"github.com/aergoio/aergo/p2p/p2pcommon"
    10  	"github.com/aergoio/aergo/types"
    11  	"time"
    12  )
    13  
    14  // dummyListManager allows all remote nodes
    15  type dummyListManager struct {
    16  
    17  }
    18  
    19  func newDummyListManager() p2pcommon.ListManager {
    20  	return &dummyListManager{}
    21  }
    22  
    23  
    24  func (*dummyListManager) Start() {
    25  }
    26  
    27  func (*dummyListManager) Stop() {
    28  }
    29  
    30  
    31  func (*dummyListManager) IsBanned(addr string, pid types.PeerID) (bool, time.Time) {
    32  	return false, UndefinedTime
    33  }
    34  
    35  func (*dummyListManager) RefineList() {
    36  }
    37  
    38  func (*dummyListManager) Summary() map[string]interface{} {
    39  	sum := make(map[string]interface{})
    40  	return sum
    41  }