good morning!!!!

Skip to content
Snippets Groups Projects
Commit fba40e18 authored by Jeffrey Wilcke's avatar Jeffrey Wilcke
Browse files

core: added accessor for queued transactions

parent d3be1a27
Branches
Tags
No related merge requests found
...@@ -201,6 +201,18 @@ func (self *TxPool) GetTransactions() (txs types.Transactions) { ...@@ -201,6 +201,18 @@ func (self *TxPool) GetTransactions() (txs types.Transactions) {
return return
} }
func (self *TxPool) GetQueuedTransactions() types.Transactions {
self.mu.RLock()
defer self.mu.RUnlock()
var txs types.Transactions
for _, ts := range self.queue {
txs = append(txs, ts...)
}
return txs
}
func (self *TxPool) RemoveTransactions(txs types.Transactions) { func (self *TxPool) RemoveTransactions(txs types.Transactions) {
self.mu.Lock() self.mu.Lock()
defer self.mu.Unlock() defer self.mu.Unlock()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment