Skip to content

Commit 7e6c1f8

Browse files
Bas van Kervelobscuren
authored andcommitted
corrected input formatters as suggested during review
1 parent ceb0739 commit 7e6c1f8

File tree

6 files changed

+4
-24
lines changed

6 files changed

+4
-24
lines changed

rpc/api/admin_js.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ web3._extend({
3434
name: 'verbosity',
3535
call: 'admin_verbosity',
3636
params: 1,
37-
inputFormatter: [web3._extend.utils.toDecimal]
37+
inputFormatter: [web3._extend.utils.fromDecimal]
3838
}),
3939
new web3._extend.Method({
4040
name: 'setSolc',
@@ -46,7 +46,7 @@ web3._extend({
4646
name: 'startRPC',
4747
call: 'admin_startRPC',
4848
params: 4,
49-
inputFormatter: [null, web3._extend.utils.toDecimal, null, null]
49+
inputFormatter: [null, null, null, null]
5050
}),
5151
new web3._extend.Method({
5252
name: 'stopRPC',

rpc/api/eth_js.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ web3._extend({
1818
name: 'resend',
1919
call: 'eth_resend',
2020
params: 3,
21-
inputFormatter: [null, null, null]
21+
inputFormatter: [web3._extend.formatters.inputTransactionFormatter, web3._extend.utils.fromDecimal, web3._extend.utils.fromDecimal]
2222
})
2323
],
2424
properties:

rpc/api/miner_js.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ web3._extend({
2727
name: 'setGasPrice',
2828
call: 'miner_setGasPrice',
2929
params: 1,
30-
inputFormatter: [null]
30+
inputFormatter: [web3._extend.utils.fromDecial]
3131
}),
3232
new web3._extend.Method({
3333
name: 'startAutoDAG',

rpc/api/net.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,8 @@ const (
1414
var (
1515
// mapping between methods and handlers
1616
netMapping = map[string]nethandler{
17-
"net_version": (*netApi).Version,
1817
"net_peerCount": (*netApi).PeerCount,
1918
"net_listening": (*netApi).IsListening,
20-
"net_peers": (*netApi).Peers,
2119
}
2220
)
2321

@@ -70,11 +68,6 @@ func (self *netApi) ApiVersion() string {
7068
return NetApiVersion
7169
}
7270

73-
// Network version
74-
func (self *netApi) Version(req *shared.Request) (interface{}, error) {
75-
return self.xeth.NetworkVersion(), nil
76-
}
77-
7871
// Number of connected peers
7972
func (self *netApi) PeerCount(req *shared.Request) (interface{}, error) {
8073
return newHexNum(self.xeth.PeerCount()), nil
@@ -84,6 +77,3 @@ func (self *netApi) IsListening(req *shared.Request) (interface{}, error) {
8477
return self.xeth.IsListening(), nil
8578
}
8679

87-
func (self *netApi) Peers(req *shared.Request) (interface{}, error) {
88-
return self.ethereum.PeersInfo(), nil
89-
}

rpc/api/net_js.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,6 @@ web3._extend({
1414
],
1515
properties:
1616
[
17-
new web3._extend.Property({
18-
name: 'peers',
19-
getter: 'net_peers'
20-
}),
21-
new web3._extend.Property({
22-
name: 'version',
23-
getter: 'net_version'
24-
})
2517
]
2618
});
2719
`

rpc/api/utils.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,6 @@ var (
9191
"net": []string{
9292
"peerCount",
9393
"listening",
94-
"version",
95-
"peers",
9694
},
9795
"personal": []string{
9896
"listAccounts",

0 commit comments

Comments
 (0)