mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 10:22:23 +00:00
remove 2 commands posv.propose & posv.discard
This commit is contained in:
parent
a4b77b62e6
commit
a554c5b968
2 changed files with 44 additions and 1 deletions
|
|
@ -819,7 +819,12 @@ func CalcDifficulty(snap *Snapshot, signer common.Address) *big.Int {
|
|||
// APIs implements consensus.Engine, returning the user facing RPC API to allow
|
||||
// controlling the signer voting.
|
||||
func (c *Posv) APIs(chain consensus.ChainReader) []rpc.API {
|
||||
return []rpc.API{}
|
||||
return []rpc.API{{
|
||||
Namespace: "posv",
|
||||
Version: "1.0",
|
||||
Service: &API{chain: chain, posv: c},
|
||||
Public: false,
|
||||
}}
|
||||
}
|
||||
|
||||
func (c *Posv) RecoverSigner(header *types.Header) (common.Address, error) {
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ var Modules = map[string]string{
|
|||
"admin": Admin_JS,
|
||||
"chequebook": Chequebook_JS,
|
||||
"clique": Clique_JS,
|
||||
"posv": Posv_JS,
|
||||
"debug": Debug_JS,
|
||||
"eth": Eth_JS,
|
||||
"miner": Miner_JS,
|
||||
|
|
@ -109,6 +110,43 @@ web3._extend({
|
|||
});
|
||||
`
|
||||
|
||||
const Posv_JS = `
|
||||
web3._extend({
|
||||
property: 'posv',
|
||||
methods: [
|
||||
new web3._extend.Method({
|
||||
name: 'getSnapshot',
|
||||
call: 'posv_getSnapshot',
|
||||
params: 1,
|
||||
inputFormatter: [null]
|
||||
}),
|
||||
new web3._extend.Method({
|
||||
name: 'getSnapshotAtHash',
|
||||
call: 'posv_getSnapshotAtHash',
|
||||
params: 1
|
||||
}),
|
||||
new web3._extend.Method({
|
||||
name: 'getSigners',
|
||||
call: 'posv_getSigners',
|
||||
params: 1,
|
||||
inputFormatter: [null]
|
||||
}),
|
||||
new web3._extend.Method({
|
||||
name: 'getSignersAtHash',
|
||||
call: 'posv_getSignersAtHash',
|
||||
params: 1
|
||||
}),
|
||||
],
|
||||
properties: [
|
||||
new web3._extend.Property({
|
||||
name: 'proposals',
|
||||
getter: 'posv_proposals'
|
||||
}),
|
||||
]
|
||||
});
|
||||
`
|
||||
|
||||
|
||||
const Admin_JS = `
|
||||
web3._extend({
|
||||
property: 'admin',
|
||||
|
|
|
|||
Loading…
Reference in a new issue