File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -247,6 +247,7 @@ func (tp *TxPool) GetTransaction(hash common.Hash) *types.Transaction {
247
247
}
248
248
249
249
// GetTransactions returns all currently processable transactions.
250
+ // The returned slice may be modified by the caller.
250
251
func (self * TxPool ) GetTransactions () (txs types.Transactions ) {
251
252
self .mu .Lock ()
252
253
defer self .mu .Unlock ()
Original file line number Diff line number Diff line change @@ -57,10 +57,12 @@ var errorToString = map[int]string{
57
57
ErrSuspendedPeer : "Suspended peer" ,
58
58
}
59
59
60
- // backend is the interface the ethereum protocol backend should implement
61
- // used as an argument to EthProtocol
62
60
type txPool interface {
61
+ // AddTransactions should add the given transactions to the pool.
63
62
AddTransactions ([]* types.Transaction )
63
+
64
+ // GetTransactions should return pending transactions.
65
+ // The slice should be modifiable by the caller.
64
66
GetTransactions () types.Transactions
65
67
}
66
68
You can’t perform that action at this time.
0 commit comments