aboutsummaryrefslogtreecommitdiffstats
path: root/internal/ethapi/backend.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2017-05-30 23:15:57 +0800
committerGitHub <noreply@github.com>2017-05-30 23:15:57 +0800
commit41bdf49eedf003a051446ec3831a4c04178ac040 (patch)
tree3e732a610f12e77808cd7f3755bdd0f2262af70f /internal/ethapi/backend.go
parent8df24760d74176cb01559e581b140e52b18cdc62 (diff)
parentea11f7dd7aa77856a04d83d0db8f303d02e0ce14 (diff)
downloaddexon-41bdf49eedf003a051446ec3831a4c04178ac040.tar
dexon-41bdf49eedf003a051446ec3831a4c04178ac040.tar.gz
dexon-41bdf49eedf003a051446ec3831a4c04178ac040.tar.bz2
dexon-41bdf49eedf003a051446ec3831a4c04178ac040.tar.lz
dexon-41bdf49eedf003a051446ec3831a4c04178ac040.tar.xz
dexon-41bdf49eedf003a051446ec3831a4c04178ac040.tar.zst
dexon-41bdf49eedf003a051446ec3831a4c04178ac040.zip
Merge pull request #14516 from holiman/noncefixes
internal/ethapi: add mutex around signing + nonce assignment
Diffstat (limited to 'internal/ethapi/backend.go')
-rw-r--r--internal/ethapi/backend.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/internal/ethapi/backend.go b/internal/ethapi/backend.go
index 42bf26613..68b5069d0 100644
--- a/internal/ethapi/backend.go
+++ b/internal/ethapi/backend.go
@@ -73,6 +73,7 @@ type State interface {
}
func GetAPIs(apiBackend Backend) []rpc.API {
+ nonceLock := new(AddrLocker)
return []rpc.API{
{
Namespace: "eth",
@@ -87,7 +88,7 @@ func GetAPIs(apiBackend Backend) []rpc.API {
}, {
Namespace: "eth",
Version: "1.0",
- Service: NewPublicTransactionPoolAPI(apiBackend),
+ Service: NewPublicTransactionPoolAPI(apiBackend, nonceLock),
Public: true,
}, {
Namespace: "txpool",
@@ -111,7 +112,7 @@ func GetAPIs(apiBackend Backend) []rpc.API {
}, {
Namespace: "personal",
Version: "1.0",
- Service: NewPrivateAccountAPI(apiBackend),
+ Service: NewPrivateAccountAPI(apiBackend, nonceLock),
Public: false,
},
}