Documentation
¶
Index ¶
- Constants
- Variables
- func CheckAddTx(ctx context.Context, s *setting.Setting, tr *tx.Transaction, typ tx.Type) error
- func CheckAddTxs(ctx context.Context, s *setting.Setting, trs []*imesh.TxWithType) error
- func ConnSize() int
- func GetBanned() map[string][]time.Time
- func GetPeerlist() []msg.Addr
- func RegisterTxNotifier(n chan []tx.Hash)
- func RunMiner(ctx context.Context, s *setting.Setting)
- func Start(ctx context.Context, setting *setting.Setting, debug bool) (net.Listener, error)
- func WriteAll(s *setting.Setting, m proto.Marshaler, cmd msg.Command)
- type Broadcaster
- type NodesDB
- func (*NodesDB) Descriptor() ([]byte, []int)
- func (this *NodesDB) Equal(that interface{}) bool
- func (m *NodesDB) Marshal() (dAtA []byte, err error)
- func (m *NodesDB) MarshalTo(dAtA []byte) (int, error)
- func (*NodesDB) ProtoMessage()
- func (m *NodesDB) Reset()
- func (m *NodesDB) Size() (n int)
- func (m *NodesDB) String() string
- func (m *NodesDB) Unmarshal(dAtA []byte) error
- func (m *NodesDB) XXX_DiscardUnknown()
- func (m *NodesDB) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *NodesDB) XXX_Merge(src proto.Message)
- func (m *NodesDB) XXX_Size() int
- func (m *NodesDB) XXX_Unmarshal(b []byte) error
Constants ¶
View Source
const ( //BanTime is time to be banned BanTime = time.Hour )
Variables ¶
View Source
var ( ErrInvalidLengthNode = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowNode = fmt.Errorf("proto: integer overflow") )
Functions ¶
func CheckAddTx ¶
CheckAddTx adds trs into imeash if they are already resolved. If not adds to search cron.
func CheckAddTxs ¶
CheckAddTxs adds trs into imeash if they are already resolved. If not adds to search cron.
func RegisterTxNotifier ¶
RegisterTxNotifier registers a notifier for resolved txs.
Types ¶
type Broadcaster ¶
Broadcaster is for consensus to communicate with peers.
func NewBroadcaster ¶
func NewBroadcaster(s *setting.Setting) *Broadcaster
NewBroadcaster returns a ConsensusPeer object.
func (*Broadcaster) Send ¶
func (bc *Broadcaster) Send(p *akconsensus.Message)
Send broadcasts a Message..
type NodesDB ¶
type NodesDB struct {
Addrs []*msg.Addr `protobuf:"bytes,1,rep,name=addrs,proto3" json:"addrs,omitempty"`
}
func NewPopulatedNodesDB ¶
func (*NodesDB) Descriptor ¶
func (*NodesDB) ProtoMessage ¶
func (*NodesDB) ProtoMessage()
func (*NodesDB) XXX_DiscardUnknown ¶
func (m *NodesDB) XXX_DiscardUnknown()
func (*NodesDB) XXX_Marshal ¶
func (*NodesDB) XXX_Unmarshal ¶
Click to show internal directories.
Click to hide internal directories.