diff options
author | StephenButtolph <[email protected]> | 2019-09-07 18:26:31 -0400 |
---|---|---|
committer | StephenButtolph <[email protected]> | 2019-09-07 18:26:31 -0400 |
commit | 99c2de7c0df891080919d4da9caeda9b11718e4f (patch) | |
tree | 21203f6719fc2d028e6399000c7ee5cc9cd26c61 | |
parent | 377c4df9de38f0ece0e4627abf4660431987ad8a (diff) |
Added helpers for removing Noops
-rw-r--r-- | coreth.go | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -64,8 +64,17 @@ func (self *ETHChain) GenBlock() { self.backend.Miner().GenBlock() } +func (self *ETHChain) PendingSize() (int, error) { + pending, err := self.backend.TxPool().Pending() + count := 0 + for _, txs := range pending { + count += len(txs) + } + return count, err +} + func (self *ETHChain) AddRemoteTxs(txs []*types.Transaction) []error { - return self.backend.TxPool().AddRemotes(txs) + return self.backend.TxPool().AddRemotesSync(txs) } func (self *ETHChain) AddLocalTxs(txs []*types.Transaction) []error { |