2018-06-04 21:10:59 +00:00
|
|
|
// Package txpool handles incoming transactions for a sharded Ethereum blockchain.
|
|
|
|
package txpool
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/ethereum/go-ethereum/log"
|
2018-06-05 21:28:57 +00:00
|
|
|
"github.com/ethereum/go-ethereum/sharding"
|
2018-06-04 21:10:59 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// ShardTXPool handles a transaction pool for a sharded system.
|
2018-06-05 21:28:57 +00:00
|
|
|
type ShardTXPool struct {
|
|
|
|
p2p sharding.ShardP2P
|
|
|
|
}
|
2018-06-04 21:10:59 +00:00
|
|
|
|
|
|
|
// NewShardTXPool creates a new observer instance.
|
2018-06-05 21:28:57 +00:00
|
|
|
func NewShardTXPool(p2p sharding.ShardP2P) (*ShardTXPool, error) {
|
|
|
|
return &ShardTXPool{p2p}, nil
|
2018-06-04 21:10:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Start the main routine for a shard transaction pool.
|
2018-06-12 04:46:53 +00:00
|
|
|
func (p *ShardTXPool) Start() {
|
2018-06-04 21:10:59 +00:00
|
|
|
log.Info("Starting shard txpool service")
|
|
|
|
}
|
|
|
|
|
|
|
|
// Stop the main loop for a transaction pool in the shard network.
|
|
|
|
func (p *ShardTXPool) Stop() error {
|
|
|
|
log.Info("Stopping shard txpool service")
|
|
|
|
return nil
|
|
|
|
}
|