added txpool func

Former-commit-id: ce9c444b973f4c856987e3393b76dceb4676bb10 [formerly 89fc90106f425a943ee1c556b0904eff5c96dda4]
Former-commit-id: c3a97c1421c394b9aaa15aaecdb2dd7a1aea75a2
This commit is contained in:
Raul Jordan
2018-01-28 15:30:32 -06:00
parent 7569bce70f
commit 3e35aaea76
2 changed files with 20 additions and 1 deletions

View File

@@ -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
}

13
sharding/txpool.go Normal file
View File

@@ -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")
}