Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
73c35559
Commit
73c35559
authored
Jun 09, 2015
by
Felix Lange
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
core, eth: document that result of GetTransactions is modifiable
parent
8dc3048f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
transaction_pool.go
core/transaction_pool.go
+1
-0
protocol.go
eth/protocol.go
+4
-2
No files found.
core/transaction_pool.go
View file @
73c35559
...
@@ -247,6 +247,7 @@ func (tp *TxPool) GetTransaction(hash common.Hash) *types.Transaction {
...
@@ -247,6 +247,7 @@ func (tp *TxPool) GetTransaction(hash common.Hash) *types.Transaction {
}
}
// GetTransactions returns all currently processable transactions.
// GetTransactions returns all currently processable transactions.
// The returned slice may be modified by the caller.
func
(
self
*
TxPool
)
GetTransactions
()
(
txs
types
.
Transactions
)
{
func
(
self
*
TxPool
)
GetTransactions
()
(
txs
types
.
Transactions
)
{
self
.
mu
.
Lock
()
self
.
mu
.
Lock
()
defer
self
.
mu
.
Unlock
()
defer
self
.
mu
.
Unlock
()
...
...
eth/protocol.go
View file @
73c35559
...
@@ -57,10 +57,12 @@ var errorToString = map[int]string{
...
@@ -57,10 +57,12 @@ var errorToString = map[int]string{
ErrSuspendedPeer
:
"Suspended peer"
,
ErrSuspendedPeer
:
"Suspended peer"
,
}
}
// backend is the interface the ethereum protocol backend should implement
// used as an argument to EthProtocol
type
txPool
interface
{
type
txPool
interface
{
// AddTransactions should add the given transactions to the pool.
AddTransactions
([]
*
types
.
Transaction
)
AddTransactions
([]
*
types
.
Transaction
)
// GetTransactions should return pending transactions.
// The slice should be modifiable by the caller.
GetTransactions
()
types
.
Transactions
GetTransactions
()
types
.
Transactions
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment