aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephenButtolph <[email protected]>2019-09-07 18:26:31 -0400
committerStephenButtolph <[email protected]>2019-09-07 18:26:31 -0400
commit99c2de7c0df891080919d4da9caeda9b11718e4f (patch)
tree21203f6719fc2d028e6399000c7ee5cc9cd26c61
parent377c4df9de38f0ece0e4627abf4660431987ad8a (diff)
Added helpers for removing Noops
-rw-r--r--coreth.go11
1 files changed, 10 insertions, 1 deletions
diff --git a/coreth.go b/coreth.go
index 1683024..c4cbf09 100644
--- a/coreth.go
+++ b/coreth.go
@@ -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 {