diff options
author | zelig <viktor.tron@gmail.com> | 2015-10-27 05:24:09 +0800 |
---|---|---|
committer | zelig <viktor.tron@gmail.com> | 2015-10-27 05:24:09 +0800 |
commit | 4d005a2c1d2929dc770acd3a2bfed59495c70557 (patch) | |
tree | 0442ccefd85cc8b692c2c58a5916bc997909657a /cmd/geth/js_test.go | |
parent | 3b4ffacd0c63952ceda96b3fafb050c91e72b420 (diff) | |
download | go-tangerine-4d005a2c1d2929dc770acd3a2bfed59495c70557.tar.gz go-tangerine-4d005a2c1d2929dc770acd3a2bfed59495c70557.tar.zst go-tangerine-4d005a2c1d2929dc770acd3a2bfed59495c70557.zip |
rpc api: eth_getNatSpec
* xeth, rpc: implement eth_getNatSpec for tx confirmations
* rename silly docserver -> httpclient
* eth/backend: httpclient now accessible via eth.Ethereum init-d via config.DocRoot
* cmd: introduce separate CLI flag for DocRoot (defaults to homedir)
* common/path: delete unused assetpath func, separate HomeDir func
Diffstat (limited to 'cmd/geth/js_test.go')
-rw-r--r-- | cmd/geth/js_test.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/cmd/geth/js_test.go b/cmd/geth/js_test.go index 09cc88519..477079706 100644 --- a/cmd/geth/js_test.go +++ b/cmd/geth/js_test.go @@ -31,7 +31,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/docserver" + "github.com/ethereum/go-ethereum/common/httpclient" "github.com/ethereum/go-ethereum/common/natspec" "github.com/ethereum/go-ethereum/common/registrar" "github.com/ethereum/go-ethereum/core" @@ -62,7 +62,7 @@ var ( type testjethre struct { *jsre lastConfirm string - ds *docserver.DocServer + client *httpclient.HTTPClient } func (self *testjethre) UnlockAccount(acc []byte) bool { @@ -75,7 +75,7 @@ func (self *testjethre) UnlockAccount(acc []byte) bool { func (self *testjethre) ConfirmTransaction(tx string) bool { if self.ethereum.NatSpec { - self.lastConfirm = natspec.GetNotice(self.xeth, tx, self.ds) + self.lastConfirm = natspec.GetNotice(self.xeth, tx, self.client) } return true } @@ -101,6 +101,7 @@ func testREPL(t *testing.T, config func(*eth.Config)) (string, *testjethre, *eth AccountManager: am, MaxPeers: 0, Name: "test", + DocRoot: "/", SolcPath: testSolcPath, PowTest: true, NewDB: func(path string) (ethdb.Database, error) { return db, nil }, @@ -130,8 +131,7 @@ func testREPL(t *testing.T, config func(*eth.Config)) (string, *testjethre, *eth assetPath := filepath.Join(os.Getenv("GOPATH"), "src", "github.com", "ethereum", "go-ethereum", "cmd", "mist", "assets", "ext") client := comms.NewInProcClient(codec.JSON) - ds := docserver.New("/") - tf := &testjethre{ds: ds} + tf := &testjethre{client: ethereum.HTTPClient()} repl := newJSRE(ethereum, assetPath, "", client, false, tf) tf.jsre = repl return tmp, tf, ethereum |