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
7584e68c
Commit
7584e68c
authored
Jun 10, 2015
by
Bas van Kervel
Committed by
Bas van Kervel
Jun 11, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
upgrade web3.js with _extend support
parent
1fe617fa
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
51 additions
and
6 deletions
+51
-6
admin.go
rpc/api/admin.go
+13
-3
debug.go
rpc/api/debug.go
+6
-2
debug_js.go
rpc/api/debug_js.go
+7
-0
personal.go
rpc/api/personal.go
+8
-0
personal_js.go
rpc/api/personal_js.go
+1
-1
shh.go
rpc/api/shh.go
+8
-0
txpool.go
rpc/api/txpool.go
+8
-0
No files found.
rpc/api/admin.go
View file @
7584e68c
...
@@ -16,7 +16,7 @@ import (
...
@@ -16,7 +16,7 @@ import (
)
)
const
(
const
(
Admin
Version
=
"1.0
.0"
Admin
Apiversion
=
"1
.0"
importBatchSize
=
2500
importBatchSize
=
2500
)
)
...
@@ -82,6 +82,10 @@ func (self *adminApi) Name() string {
...
@@ -82,6 +82,10 @@ func (self *adminApi) Name() string {
return
AdminApiName
return
AdminApiName
}
}
func
(
self
*
adminApi
)
ApiVersion
()
string
{
return
AdminApiversion
}
func
(
self
*
adminApi
)
AddPeer
(
req
*
shared
.
Request
)
(
interface
{},
error
)
{
func
(
self
*
adminApi
)
AddPeer
(
req
*
shared
.
Request
)
(
interface
{},
error
)
{
args
:=
new
(
AddPeerArgs
)
args
:=
new
(
AddPeerArgs
)
if
err
:=
self
.
codec
.
Decode
(
req
.
Params
,
&
args
);
err
!=
nil
{
if
err
:=
self
.
codec
.
Decode
(
req
.
Params
,
&
args
);
err
!=
nil
{
...
@@ -215,8 +219,14 @@ func (self *adminApi) Verbosity(req *shared.Request) (interface{}, error) {
...
@@ -215,8 +219,14 @@ func (self *adminApi) Verbosity(req *shared.Request) (interface{}, error) {
}
}
func
(
self
*
adminApi
)
ChainSyncStatus
(
req
*
shared
.
Request
)
(
interface
{},
error
)
{
func
(
self
*
adminApi
)
ChainSyncStatus
(
req
*
shared
.
Request
)
(
interface
{},
error
)
{
pending
,
cached
:=
self
.
ethereum
.
Downloader
()
.
Stats
()
pending
,
cached
,
importing
,
estimate
:=
self
.
ethereum
.
Downloader
()
.
Stats
()
return
map
[
string
]
interface
{}{
"blocksAvailable"
:
pending
,
"blocksWaitingForImport"
:
cached
},
nil
return
map
[
string
]
interface
{}{
"blocksAvailable"
:
pending
,
"blocksWaitingForImport"
:
cached
,
"importing"
:
importing
,
"estimate"
:
estimate
.
String
(),
},
nil
}
}
func
(
self
*
adminApi
)
SetSolc
(
req
*
shared
.
Request
)
(
interface
{},
error
)
{
func
(
self
*
adminApi
)
SetSolc
(
req
*
shared
.
Request
)
(
interface
{},
error
)
{
...
...
rpc/api/debug.go
View file @
7584e68c
...
@@ -14,7 +14,7 @@ import (
...
@@ -14,7 +14,7 @@ import (
)
)
const
(
const
(
Debug
Version
=
"1.0
.0"
Debug
ApiVersion
=
"1
.0"
)
)
var
(
var
(
...
@@ -74,6 +74,10 @@ func (self *debugApi) Name() string {
...
@@ -74,6 +74,10 @@ func (self *debugApi) Name() string {
return
DebugApiName
return
DebugApiName
}
}
func
(
self
*
debugApi
)
ApiVersion
()
string
{
return
DebugApiVersion
}
func
(
self
*
debugApi
)
PrintBlock
(
req
*
shared
.
Request
)
(
interface
{},
error
)
{
func
(
self
*
debugApi
)
PrintBlock
(
req
*
shared
.
Request
)
(
interface
{},
error
)
{
args
:=
new
(
BlockNumArg
)
args
:=
new
(
BlockNumArg
)
if
err
:=
self
.
codec
.
Decode
(
req
.
Params
,
&
args
);
err
!=
nil
{
if
err
:=
self
.
codec
.
Decode
(
req
.
Params
,
&
args
);
err
!=
nil
{
...
@@ -100,7 +104,7 @@ func (self *debugApi) DumpBlock(req *shared.Request) (interface{}, error) {
...
@@ -100,7 +104,7 @@ func (self *debugApi) DumpBlock(req *shared.Request) (interface{}, error) {
return
nil
,
nil
return
nil
,
nil
}
}
return
stateDb
.
Dump
(),
nil
return
stateDb
.
Raw
Dump
(),
nil
}
}
func
(
self
*
debugApi
)
GetBlockRlp
(
req
*
shared
.
Request
)
(
interface
{},
error
)
{
func
(
self
*
debugApi
)
GetBlockRlp
(
req
*
shared
.
Request
)
(
interface
{},
error
)
{
...
...
rpc/api/debug_js.go
View file @
7584e68c
...
@@ -39,6 +39,13 @@ web3._extend({
...
@@ -39,6 +39,13 @@ web3._extend({
params: 1,
params: 1,
inputFormatter: [web3._extend.formatters.formatInputInt],
inputFormatter: [web3._extend.formatters.formatInputInt],
outputFormatter: web3._extend.formatters.formatOutputString
outputFormatter: web3._extend.formatters.formatOutputString
}) ,
new web3._extend.Method({
name: 'dumpBlock',
call: 'debug_dumpBlock',
params: 1,
inputFormatter: [web3._extend.formatters.formatInputInt],
outputFormatter: function(obj) { return obj; }
})
})
],
],
properties:
properties:
...
...
rpc/api/personal.go
View file @
7584e68c
...
@@ -10,6 +10,10 @@ import (
...
@@ -10,6 +10,10 @@ import (
"github.com/ethereum/go-ethereum/xeth"
"github.com/ethereum/go-ethereum/xeth"
)
)
const
(
PersonalApiVersion
=
"1.0"
)
var
(
var
(
// mapping between methods and handlers
// mapping between methods and handlers
personalMapping
=
map
[
string
]
personalhandler
{
personalMapping
=
map
[
string
]
personalhandler
{
...
@@ -65,6 +69,10 @@ func (self *personalApi) Name() string {
...
@@ -65,6 +69,10 @@ func (self *personalApi) Name() string {
return
PersonalApiName
return
PersonalApiName
}
}
func
(
self
*
personalApi
)
ApiVersion
()
string
{
return
PersonalApiVersion
}
func
(
self
*
personalApi
)
ListAccounts
(
req
*
shared
.
Request
)
(
interface
{},
error
)
{
func
(
self
*
personalApi
)
ListAccounts
(
req
*
shared
.
Request
)
(
interface
{},
error
)
{
return
self
.
xeth
.
Accounts
(),
nil
return
self
.
xeth
.
Accounts
(),
nil
}
}
...
...
rpc/api/personal_js.go
View file @
7584e68c
...
@@ -23,7 +23,7 @@ web3._extend({
...
@@ -23,7 +23,7 @@ web3._extend({
properties:
properties:
[
[
new web3._extend.Property({
new web3._extend.Property({
name: '
a
ccounts',
name: '
listA
ccounts',
getter: 'personal_listAccounts',
getter: 'personal_listAccounts',
outputFormatter: function(obj) { return obj; }
outputFormatter: function(obj) { return obj; }
})
})
...
...
rpc/api/shh.go
View file @
7584e68c
...
@@ -9,6 +9,10 @@ import (
...
@@ -9,6 +9,10 @@ import (
"github.com/ethereum/go-ethereum/xeth"
"github.com/ethereum/go-ethereum/xeth"
)
)
const
(
ShhApiVersion
=
"1.0"
)
var
(
var
(
// mapping between methods and handlers
// mapping between methods and handlers
shhMapping
=
map
[
string
]
shhhandler
{
shhMapping
=
map
[
string
]
shhhandler
{
...
@@ -71,6 +75,10 @@ func (self *shhApi) Name() string {
...
@@ -71,6 +75,10 @@ func (self *shhApi) Name() string {
return
ShhApiName
return
ShhApiName
}
}
func
(
self
*
shhApi
)
ApiVersion
()
string
{
return
ShhApiVersion
}
func
(
self
*
shhApi
)
Version
(
req
*
shared
.
Request
)
(
interface
{},
error
)
{
func
(
self
*
shhApi
)
Version
(
req
*
shared
.
Request
)
(
interface
{},
error
)
{
w
:=
self
.
xeth
.
Whisper
()
w
:=
self
.
xeth
.
Whisper
()
if
w
==
nil
{
if
w
==
nil
{
...
...
rpc/api/txpool.go
View file @
7584e68c
...
@@ -7,6 +7,10 @@ import (
...
@@ -7,6 +7,10 @@ import (
"github.com/ethereum/go-ethereum/xeth"
"github.com/ethereum/go-ethereum/xeth"
)
)
const
(
TxPoolApiVersion
=
"1.0"
)
var
(
var
(
// mapping between methods and handlers
// mapping between methods and handlers
txpoolMapping
=
map
[
string
]
txpoolhandler
{
txpoolMapping
=
map
[
string
]
txpoolhandler
{
...
@@ -59,6 +63,10 @@ func (self *txPoolApi) Name() string {
...
@@ -59,6 +63,10 @@ func (self *txPoolApi) Name() string {
return
TxPoolApiName
return
TxPoolApiName
}
}
func
(
self
*
txPoolApi
)
ApiVersion
()
string
{
return
TxPoolApiVersion
}
func
(
self
*
txPoolApi
)
Status
(
req
*
shared
.
Request
)
(
interface
{},
error
)
{
func
(
self
*
txPoolApi
)
Status
(
req
*
shared
.
Request
)
(
interface
{},
error
)
{
return
map
[
string
]
int
{
return
map
[
string
]
int
{
"pending"
:
self
.
ethereum
.
TxPool
()
.
GetTransactions
()
.
Len
(),
"pending"
:
self
.
ethereum
.
TxPool
()
.
GetTransactions
()
.
Len
(),
...
...
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