good morning!!!!
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
bor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open
bor
Commits
4c1d0b16
Unverified
Commit
4c1d0b16
authored
Jul 5, 2017
by
Péter Szilágyi
Browse files
Options
Downloads
Patches
Plain Diff
eth: drop leftover from previous nonce protection scheme
parent
48ee7f9d
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
eth/api_backend.go
+0
-22
0 additions, 22 deletions
eth/api_backend.go
eth/backend.go
+0
-1
0 additions, 1 deletion
eth/backend.go
with
0 additions
and
23 deletions
eth/api_backend.go
+
0
−
22
View file @
4c1d0b16
...
@@ -116,28 +116,18 @@ func (b *EthApiBackend) GetEVM(ctx context.Context, msg core.Message, state *sta
...
@@ -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
{
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
)
return
b
.
eth
.
txPool
.
AddLocal
(
signedTx
)
}
}
func
(
b
*
EthApiBackend
)
RemoveTx
(
txHash
common
.
Hash
)
{
func
(
b
*
EthApiBackend
)
RemoveTx
(
txHash
common
.
Hash
)
{
b
.
eth
.
txMu
.
Lock
()
defer
b
.
eth
.
txMu
.
Unlock
()
b
.
eth
.
txPool
.
Remove
(
txHash
)
b
.
eth
.
txPool
.
Remove
(
txHash
)
}
}
func
(
b
*
EthApiBackend
)
GetPoolTransactions
()
(
types
.
Transactions
,
error
)
{
func
(
b
*
EthApiBackend
)
GetPoolTransactions
()
(
types
.
Transactions
,
error
)
{
b
.
eth
.
txMu
.
Lock
()
defer
b
.
eth
.
txMu
.
Unlock
()
pending
,
err
:=
b
.
eth
.
txPool
.
Pending
()
pending
,
err
:=
b
.
eth
.
txPool
.
Pending
()
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
}
}
var
txs
types
.
Transactions
var
txs
types
.
Transactions
for
_
,
batch
:=
range
pending
{
for
_
,
batch
:=
range
pending
{
txs
=
append
(
txs
,
batch
...
)
txs
=
append
(
txs
,
batch
...
)
...
@@ -146,30 +136,18 @@ func (b *EthApiBackend) GetPoolTransactions() (types.Transactions, error) {
...
@@ -146,30 +136,18 @@ func (b *EthApiBackend) GetPoolTransactions() (types.Transactions, error) {
}
}
func
(
b
*
EthApiBackend
)
GetPoolTransaction
(
hash
common
.
Hash
)
*
types
.
Transaction
{
func
(
b
*
EthApiBackend
)
GetPoolTransaction
(
hash
common
.
Hash
)
*
types
.
Transaction
{
b
.
eth
.
txMu
.
Lock
()
defer
b
.
eth
.
txMu
.
Unlock
()
return
b
.
eth
.
txPool
.
Get
(
hash
)
return
b
.
eth
.
txPool
.
Get
(
hash
)
}
}
func
(
b
*
EthApiBackend
)
GetPoolNonce
(
ctx
context
.
Context
,
addr
common
.
Address
)
(
uint64
,
error
)
{
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
return
b
.
eth
.
txPool
.
State
()
.
GetNonce
(
addr
),
nil
}
}
func
(
b
*
EthApiBackend
)
Stats
()
(
pending
int
,
queued
int
)
{
func
(
b
*
EthApiBackend
)
Stats
()
(
pending
int
,
queued
int
)
{
b
.
eth
.
txMu
.
Lock
()
defer
b
.
eth
.
txMu
.
Unlock
()
return
b
.
eth
.
txPool
.
Stats
()
return
b
.
eth
.
txPool
.
Stats
()
}
}
func
(
b
*
EthApiBackend
)
TxPoolContent
()
(
map
[
common
.
Address
]
types
.
Transactions
,
map
[
common
.
Address
]
types
.
Transactions
)
{
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
()
return
b
.
eth
.
TxPool
()
.
Content
()
}
}
...
...
This diff is collapsed.
Click to expand it.
eth/backend.go
+
0
−
1
View file @
4c1d0b16
...
@@ -63,7 +63,6 @@ type Ethereum struct {
...
@@ -63,7 +63,6 @@ type Ethereum struct {
stopDbUpgrade
func
()
// stop chain db sequential key upgrade
stopDbUpgrade
func
()
// stop chain db sequential key upgrade
// Handlers
// Handlers
txPool
*
core
.
TxPool
txPool
*
core
.
TxPool
txMu
sync
.
Mutex
blockchain
*
core
.
BlockChain
blockchain
*
core
.
BlockChain
protocolManager
*
ProtocolManager
protocolManager
*
ProtocolManager
lesServer
LesServer
lesServer
LesServer
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment