diff --git a/sharding/client.go b/sharding/client.go index f71a5f7116..a80637a75a 100644 --- a/sharding/client.go +++ b/sharding/client.go @@ -72,8 +72,14 @@ func (c *Client) Start() error { return err } - // Listens to incoming transactions from the geth node's txpool + // TODO: Wait to be selected as a collator, then start listening to the + // geth node's txpool. + // Listens to incoming transactions from the geth node's txpool and directs + // them into the VMC if node is a collator + if err := listenTXPool(c); err != nil { + return err + } return nil } diff --git a/sharding/txpool.go b/sharding/txpool.go new file mode 100644 index 0000000000..14cf6817fc --- /dev/null +++ b/sharding/txpool.go @@ -0,0 +1,13 @@ +package sharding + +import ( + "fmt" +) + +// listenTXPool finds the pending tx's from the running geth node +// and sorts them by descending order of gas price, eliminates those +// that ask for too much gas, and routes them over to the VMC if the current +// node is a collator +func listenTXPool(c *Client) error { + return fmt.Errorf("Not Implemented") +}