aboutsummaryrefslogtreecommitdiffstats
path: root/eth/backend.go
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2015-10-28 17:49:53 +0800
committerJeffrey Wilcke <jeffrey@ethereum.org>2015-10-28 17:49:53 +0800
commit05f74077fb1bc23937f3b25fd4e826dcf5789212 (patch)
treee1fca4dd2efc253b00e2d39c3c554de87f8b78f9 /eth/backend.go
parent2e4fdce74334206dd4341028594bcef140d00b92 (diff)
parent4d005a2c1d2929dc770acd3a2bfed59495c70557 (diff)
downloadgo-tangerine-05f74077fb1bc23937f3b25fd4e826dcf5789212.tar.gz
go-tangerine-05f74077fb1bc23937f3b25fd4e826dcf5789212.tar.zst
go-tangerine-05f74077fb1bc23937f3b25fd4e826dcf5789212.zip
Merge pull request #1919 from ethersphere/getnatspec
rpc api: eth_getNatSpec
Diffstat (limited to 'eth/backend.go')
-rw-r--r--eth/backend.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/eth/backend.go b/eth/backend.go
index 6ce0d0eb0..ee857e146 100644
--- a/eth/backend.go
+++ b/eth/backend.go
@@ -35,6 +35,7 @@ import (
"github.com/ethereum/go-ethereum/accounts"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/compiler"
+ "github.com/ethereum/go-ethereum/common/httpclient"
"github.com/ethereum/go-ethereum/core"
"github.com/ethereum/go-ethereum/core/state"
"github.com/ethereum/go-ethereum/core/types"
@@ -106,6 +107,7 @@ type Config struct {
LogJSON string
VmDebug bool
NatSpec bool
+ DocRoot string
AutoDAG bool
PowTest bool
ExtraData []byte
@@ -249,6 +251,8 @@ type Ethereum struct {
GpobaseStepUp int
GpobaseCorrectionFactor int
+ httpclient *httpclient.HTTPClient
+
net *p2p.Server
eventMux *event.TypeMux
miner *miner.Miner
@@ -400,6 +404,7 @@ func New(config *Config) (*Ethereum, error) {
GpobaseStepDown: config.GpobaseStepDown,
GpobaseStepUp: config.GpobaseStepUp,
GpobaseCorrectionFactor: config.GpobaseCorrectionFactor,
+ httpclient: httpclient.New(config.DocRoot),
}
if config.PowTest {
@@ -702,6 +707,12 @@ func (self *Ethereum) StopAutoDAG() {
glog.V(logger.Info).Infof("Automatic pregeneration of ethash DAG OFF (ethash dir: %s)", ethash.DefaultDir)
}
+// HTTPClient returns the light http client used for fetching offchain docs
+// (natspec, source for verification)
+func (self *Ethereum) HTTPClient() *httpclient.HTTPClient {
+ return self.httpclient
+}
+
func (self *Ethereum) Solc() (*compiler.Solidity, error) {
var err error
if self.solc == nil {