prysm-pulse/client/txpool/service.go
Raul Jordan b6cd890a67 Log Verbosity Flags + Logrus Package Level Logs With Fields (#304)
Former-commit-id: f7344b7d3fb2fa07f0fd421c5ed3721f6c7a9258 [formerly e678ab2f1681d9492c0e1b142cd06ee08a462fdb]
Former-commit-id: d942da3d5cfcde921bebb149c26edd5c4ed178dd
2018-07-21 12:51:18 -05:00

33 lines
869 B
Go

// Package txpool handles incoming transactions for a sharded Ethereum blockchain.
package txpool
import (
"github.com/ethereum/go-ethereum/event"
"github.com/prysmaticlabs/prysm/client/p2p"
"github.com/sirupsen/logrus"
)
var log = logrus.WithField("prefix", "txpool")
// TXPool handles a transaction pool for a sharded system.
type TXPool struct {
p2p *p2p.Server
transactionsFeed *event.Feed
}
// NewTXPool creates a new observer instance.
func NewTXPool(p2p *p2p.Server) (*TXPool, error) {
return &TXPool{p2p: p2p, transactionsFeed: new(event.Feed)}, nil
}
// Start the main routine for a shard transaction pool.
func (p *TXPool) Start() {
log.Info("Starting shard txpool service")
}
// Stop the main loop for a transaction pool in the shard network.
func (p *TXPool) Stop() error {
log.Info("Stopping shard txpool service")
return nil
}