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
4c1d0b16
Unverified
Commit
4c1d0b16
authored
Jul 05, 2017
by
Péter Szilágyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eth: drop leftover from previous nonce protection scheme
parent
48ee7f9d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
23 deletions
+0
-23
api_backend.go
eth/api_backend.go
+0
-22
backend.go
eth/backend.go
+0
-1
No files found.
eth/api_backend.go
View file @
4c1d0b16
...
...
@@ -116,28 +116,18 @@ func (b *EthApiBackend) GetEVM(ctx context.Context, msg core.Message, state *sta
}
func
(
b
*
EthApiBackend
)
SendTx
(
ctx
context
.
Context
,
signedTx
*
types
.
Transaction
)
error
{
b
.
eth
.
txMu
.
Lock
()
defer
b
.
eth
.
txMu
.
Unlock
()
return
b
.
eth
.
txPool
.
AddLocal
(
signedTx
)
}
func
(
b
*
EthApiBackend
)
RemoveTx
(
txHash
common
.
Hash
)
{
b
.
eth
.
txMu
.
Lock
()
defer
b
.
eth
.
txMu
.
Unlock
()
b
.
eth
.
txPool
.
Remove
(
txHash
)
}
func
(
b
*
EthApiBackend
)
GetPoolTransactions
()
(
types
.
Transactions
,
error
)
{
b
.
eth
.
txMu
.
Lock
()
defer
b
.
eth
.
txMu
.
Unlock
()
pending
,
err
:=
b
.
eth
.
txPool
.
Pending
()
if
err
!=
nil
{
return
nil
,
err
}
var
txs
types
.
Transactions
for
_
,
batch
:=
range
pending
{
txs
=
append
(
txs
,
batch
...
)
...
...
@@ -146,30 +136,18 @@ func (b *EthApiBackend) GetPoolTransactions() (types.Transactions, error) {
}
func
(
b
*
EthApiBackend
)
GetPoolTransaction
(
hash
common
.
Hash
)
*
types
.
Transaction
{
b
.
eth
.
txMu
.
Lock
()
defer
b
.
eth
.
txMu
.
Unlock
()
return
b
.
eth
.
txPool
.
Get
(
hash
)
}
func
(
b
*
EthApiBackend
)
GetPoolNonce
(
ctx
context
.
Context
,
addr
common
.
Address
)
(
uint64
,
error
)
{
b
.
eth
.
txMu
.
Lock
()
defer
b
.
eth
.
txMu
.
Unlock
()
return
b
.
eth
.
txPool
.
State
()
.
GetNonce
(
addr
),
nil
}
func
(
b
*
EthApiBackend
)
Stats
()
(
pending
int
,
queued
int
)
{
b
.
eth
.
txMu
.
Lock
()
defer
b
.
eth
.
txMu
.
Unlock
()
return
b
.
eth
.
txPool
.
Stats
()
}
func
(
b
*
EthApiBackend
)
TxPoolContent
()
(
map
[
common
.
Address
]
types
.
Transactions
,
map
[
common
.
Address
]
types
.
Transactions
)
{
b
.
eth
.
txMu
.
Lock
()
defer
b
.
eth
.
txMu
.
Unlock
()
return
b
.
eth
.
TxPool
()
.
Content
()
}
...
...
eth/backend.go
View file @
4c1d0b16
...
...
@@ -63,7 +63,6 @@ type Ethereum struct {
stopDbUpgrade
func
()
// stop chain db sequential key upgrade
// Handlers
txPool
*
core
.
TxPool
txMu
sync
.
Mutex
blockchain
*
core
.
BlockChain
protocolManager
*
ProtocolManager
lesServer
LesServer
...
...
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