forked from cerc-io/plugeth
cmd,eth,les,internal: remove natspec support
This commit is contained in:
parent
26d385c18b
commit
54a65e6d87
@ -106,7 +106,6 @@ func init() {
|
|||||||
utils.AutoDAGFlag,
|
utils.AutoDAGFlag,
|
||||||
utils.TargetGasLimitFlag,
|
utils.TargetGasLimitFlag,
|
||||||
utils.NATFlag,
|
utils.NATFlag,
|
||||||
utils.NatspecEnabledFlag,
|
|
||||||
utils.NoDiscoverFlag,
|
utils.NoDiscoverFlag,
|
||||||
utils.DiscoveryV5Flag,
|
utils.DiscoveryV5Flag,
|
||||||
utils.NetrestrictFlag,
|
utils.NetrestrictFlag,
|
||||||
|
@ -169,7 +169,6 @@ var AppHelpFlagGroups = []flagGroup{
|
|||||||
Name: "EXPERIMENTAL",
|
Name: "EXPERIMENTAL",
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
utils.WhisperEnabledFlag,
|
utils.WhisperEnabledFlag,
|
||||||
utils.NatspecEnabledFlag,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -130,10 +130,6 @@ var (
|
|||||||
Name: "identity",
|
Name: "identity",
|
||||||
Usage: "Custom node name",
|
Usage: "Custom node name",
|
||||||
}
|
}
|
||||||
NatspecEnabledFlag = cli.BoolFlag{
|
|
||||||
Name: "natspec",
|
|
||||||
Usage: "Enable NatSpec confirmation notice",
|
|
||||||
}
|
|
||||||
DocRootFlag = DirectoryFlag{
|
DocRootFlag = DirectoryFlag{
|
||||||
Name: "docroot",
|
Name: "docroot",
|
||||||
Usage: "Document Root for HTTPClient file scheme",
|
Usage: "Document Root for HTTPClient file scheme",
|
||||||
@ -730,7 +726,6 @@ func RegisterEthService(ctx *cli.Context, stack *node.Node, extra []byte) {
|
|||||||
NetworkId: ctx.GlobalInt(NetworkIdFlag.Name),
|
NetworkId: ctx.GlobalInt(NetworkIdFlag.Name),
|
||||||
MinerThreads: ctx.GlobalInt(MinerThreadsFlag.Name),
|
MinerThreads: ctx.GlobalInt(MinerThreadsFlag.Name),
|
||||||
ExtraData: MakeMinerExtra(extra, ctx),
|
ExtraData: MakeMinerExtra(extra, ctx),
|
||||||
NatSpec: ctx.GlobalBool(NatspecEnabledFlag.Name),
|
|
||||||
DocRoot: ctx.GlobalString(DocRootFlag.Name),
|
DocRoot: ctx.GlobalString(DocRootFlag.Name),
|
||||||
GasPrice: common.String2Big(ctx.GlobalString(GasPriceFlag.Name)),
|
GasPrice: common.String2Big(ctx.GlobalString(GasPriceFlag.Name)),
|
||||||
GpoMinGasPrice: common.String2Big(ctx.GlobalString(GpoMinGasPriceFlag.Name)),
|
GpoMinGasPrice: common.String2Big(ctx.GlobalString(GpoMinGasPriceFlag.Name)),
|
||||||
|
@ -36,7 +36,7 @@ contract test {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
`
|
`
|
||||||
testInfo = `{"source":"\ncontract test {\n /// @notice Will multiply ` + "`a`" + ` by 7.\n function multiply(uint a) returns(uint d) {\n return a * 7;\n }\n}\n","language":"Solidity","languageVersion":"0.1.1","compilerVersion":"0.1.1","compilerOptions":"--binary file --json-abi file --natspec-user file --natspec-dev file --add-std 1","abiDefinition":[{"constant":false,"inputs":[{"name":"a","type":"uint256"}],"name":"multiply","outputs":[{"name":"d","type":"uint256"}],"type":"function"}],"userDoc":{"methods":{"multiply(uint256)":{"notice":"Will multiply ` + "`a`" + ` by 7."}}},"developerDoc":{"methods":{}}}`
|
testInfo = `{"source":"\ncontract test {\n /// @notice Will multiply ` + "`a`" + ` by 7.\n function multiply(uint a) returns(uint d) {\n return a * 7;\n }\n}\n","language":"Solidity","languageVersion":"0.1.1","compilerVersion":"0.1.1","compilerOptions":"--binary file --json-abi file --add-std 1","abiDefinition":[{"constant":false,"inputs":[{"name":"a","type":"uint256"}],"name":"multiply","outputs":[{"name":"d","type":"uint256"}],"type":"function"}],"userDoc":{"methods":{"multiply(uint256)":{"notice":"Will multiply ` + "`a`" + ` by 7."}}},"developerDoc":{"methods":{}}}`
|
||||||
)
|
)
|
||||||
|
|
||||||
func skipWithoutSolc(t *testing.T) {
|
func skipWithoutSolc(t *testing.T) {
|
||||||
@ -99,7 +99,7 @@ func TestSaveInfo(t *testing.T) {
|
|||||||
if string(got) != testInfo {
|
if string(got) != testInfo {
|
||||||
t.Errorf("incorrect info.json extracted, expected:\n%s\ngot\n%s", testInfo, string(got))
|
t.Errorf("incorrect info.json extracted, expected:\n%s\ngot\n%s", testInfo, string(got))
|
||||||
}
|
}
|
||||||
wantHash := common.HexToHash("0x9f3803735e7f16120c5a140ab3f02121fd3533a9655c69b33a10e78752cc49b0")
|
wantHash := common.HexToHash("0x22450a77f0c3ff7a395948d07bc1456881226a1b6325f4189cb5f1254a824080")
|
||||||
if cinfohash != wantHash {
|
if cinfohash != wantHash {
|
||||||
t.Errorf("content hash for info is incorrect. expected %v, got %v", wantHash.Hex(), cinfohash.Hex())
|
t.Errorf("content hash for info is incorrect. expected %v, got %v", wantHash.Hex(), cinfohash.Hex())
|
||||||
}
|
}
|
||||||
|
@ -77,7 +77,6 @@ type Config struct {
|
|||||||
DatabaseCache int
|
DatabaseCache int
|
||||||
DatabaseHandles int
|
DatabaseHandles int
|
||||||
|
|
||||||
NatSpec bool
|
|
||||||
DocRoot string
|
DocRoot string
|
||||||
AutoDAG bool
|
AutoDAG bool
|
||||||
PowFake bool
|
PowFake bool
|
||||||
@ -140,7 +139,6 @@ type Ethereum struct {
|
|||||||
etherbase common.Address
|
etherbase common.Address
|
||||||
solcPath string
|
solcPath string
|
||||||
|
|
||||||
NatSpec bool
|
|
||||||
netVersionId int
|
netVersionId int
|
||||||
netRPCService *ethapi.PublicNetAPI
|
netRPCService *ethapi.PublicNetAPI
|
||||||
}
|
}
|
||||||
@ -174,7 +172,6 @@ func New(ctx *node.ServiceContext, config *Config) (*Ethereum, error) {
|
|||||||
shutdownChan: make(chan bool),
|
shutdownChan: make(chan bool),
|
||||||
stopDbUpgrade: stopDbUpgrade,
|
stopDbUpgrade: stopDbUpgrade,
|
||||||
netVersionId: config.NetworkId,
|
netVersionId: config.NetworkId,
|
||||||
NatSpec: config.NatSpec,
|
|
||||||
etherbase: config.Etherbase,
|
etherbase: config.Etherbase,
|
||||||
MinerThreads: config.MinerThreads,
|
MinerThreads: config.MinerThreads,
|
||||||
AutoDAG: config.AutoDAG,
|
AutoDAG: config.AutoDAG,
|
||||||
|
@ -408,12 +408,6 @@ web3._extend({
|
|||||||
params: 3,
|
params: 3,
|
||||||
inputFormatter: [web3._extend.formatters.inputTransactionFormatter, web3._extend.utils.fromDecimal, web3._extend.utils.fromDecimal]
|
inputFormatter: [web3._extend.formatters.inputTransactionFormatter, web3._extend.utils.fromDecimal, web3._extend.utils.fromDecimal]
|
||||||
}),
|
}),
|
||||||
new web3._extend.Method({
|
|
||||||
name: 'getNatSpec',
|
|
||||||
call: 'eth_getNatSpec',
|
|
||||||
params: 1,
|
|
||||||
inputFormatter: [web3._extend.formatters.inputTransactionFormatter]
|
|
||||||
}),
|
|
||||||
new web3._extend.Method({
|
new web3._extend.Method({
|
||||||
name: 'signTransaction',
|
name: 'signTransaction',
|
||||||
call: 'eth_signTransaction',
|
call: 'eth_signTransaction',
|
||||||
|
@ -66,7 +66,6 @@ type LightEthereum struct {
|
|||||||
solcPath string
|
solcPath string
|
||||||
solc *compiler.Solidity
|
solc *compiler.Solidity
|
||||||
|
|
||||||
NatSpec bool
|
|
||||||
netVersionId int
|
netVersionId int
|
||||||
netRPCService *ethapi.PublicNetAPI
|
netRPCService *ethapi.PublicNetAPI
|
||||||
}
|
}
|
||||||
@ -95,7 +94,6 @@ func New(ctx *node.ServiceContext, config *eth.Config) (*LightEthereum, error) {
|
|||||||
pow: pow,
|
pow: pow,
|
||||||
shutdownChan: make(chan bool),
|
shutdownChan: make(chan bool),
|
||||||
netVersionId: config.NetworkId,
|
netVersionId: config.NetworkId,
|
||||||
NatSpec: config.NatSpec,
|
|
||||||
solcPath: config.SolcPath,
|
solcPath: config.SolcPath,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -44,9 +44,7 @@ If Host is left empty, localhost is assumed.
|
|||||||
|
|
||||||
Using a public gateway, the above few lines gives you the leanest
|
Using a public gateway, the above few lines gives you the leanest
|
||||||
bzz-scheme aware read-only http client. You really only ever need this
|
bzz-scheme aware read-only http client. You really only ever need this
|
||||||
if you need go-native swarm access to bzz addresses, e.g.,
|
if you need go-native swarm access to bzz addresses.
|
||||||
github.com/ethereum/go-ethereum/common/natspec
|
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
type RoundTripper struct {
|
type RoundTripper struct {
|
||||||
|
Loading…
Reference in New Issue
Block a user