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
0c27c5eb
Commit
0c27c5eb
authored
May 21, 2014
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Proper log statement
parent
05e4e972
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
transaction_pool.go
ethchain/transaction_pool.go
+3
-4
No files found.
ethchain/transaction_pool.go
View file @
0c27c5eb
...
@@ -81,8 +81,9 @@ func NewTxPool(ethereum EthManager) *TxPool {
...
@@ -81,8 +81,9 @@ func NewTxPool(ethereum EthManager) *TxPool {
// Blocking function. Don't use directly. Use QueueTransaction instead
// Blocking function. Don't use directly. Use QueueTransaction instead
func
(
pool
*
TxPool
)
addTransaction
(
tx
*
Transaction
)
{
func
(
pool
*
TxPool
)
addTransaction
(
tx
*
Transaction
)
{
pool
.
mutex
.
Lock
()
pool
.
mutex
.
Lock
()
defer
pool
.
mutex
.
Unlock
()
pool
.
pool
.
PushBack
(
tx
)
pool
.
pool
.
PushBack
(
tx
)
pool
.
mutex
.
Unlock
()
// Broadcast the transaction to the rest of the peers
// Broadcast the transaction to the rest of the peers
pool
.
Ethereum
.
Broadcast
(
ethwire
.
MsgTxTy
,
[]
interface
{}{
tx
.
RlpData
()})
pool
.
Ethereum
.
Broadcast
(
ethwire
.
MsgTxTy
,
[]
interface
{}{
tx
.
RlpData
()})
...
@@ -182,9 +183,7 @@ out:
...
@@ -182,9 +183,7 @@ out:
// Validate the transaction
// Validate the transaction
err
:=
pool
.
ValidateTransaction
(
tx
)
err
:=
pool
.
ValidateTransaction
(
tx
)
if
err
!=
nil
{
if
err
!=
nil
{
if
ethutil
.
Config
.
Debug
{
ethutil
.
Config
.
Log
.
Debugln
(
"Validating Tx failed"
,
err
)
log
.
Println
(
"Validating Tx failed"
,
err
)
}
}
else
{
}
else
{
// Call blocking version.
// Call blocking version.
pool
.
addTransaction
(
tx
)
pool
.
addTransaction
(
tx
)
...
...
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