Skip to content

Commit

Permalink
Expose mobile http server (ethereum#2)
Browse files Browse the repository at this point in the history
* Expose mobile http server

* Must set vhosts

* Add package.json

* Try postinstall

* I am silly

* Add .aar to package

* don't make on install

* Switched to new mobile mining app.

* Fixed a bug.

* Cleaned up some code and added comments.

* Added todo and reformatted.

* Small changes.

* Expose personal

* add ipc

* new version

* remove comments

* new build
  • Loading branch information
cmcewen committed Jul 6, 2018
1 parent 2ed5ad7 commit 5449dc5
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 6 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Expand Up @@ -24,7 +24,8 @@ build/_vendor/pkg

# used by the Makefile
/build/_workspace/
/build/bin/
/build/bin/*
!/build/bin/geth.aar
/geth*.zip

# travis
Expand All @@ -45,3 +46,5 @@ profile.cov
/dashboard/assets/package-lock.json

**/yarn-error.log


Binary file added build/bin/geth.aar
Binary file not shown.
Binary file added geth-sources.jar
Binary file not shown.
1 change: 0 additions & 1 deletion miner/worker.go
Expand Up @@ -485,7 +485,6 @@ func (self *worker) commitNewWork() {
log.Error("Failed to finalize block for sealing", "err", err)
return
}

// We only care about logging if we're actually mining.
if atomic.LoadInt32(&self.mining) == 1 {
log.Info("Commit new mining work", "number", work.Block.Number(), "txs", work.tcount, "uncles", len(uncles), "elapsed", common.PrettyDuration(time.Since(tstart)))
Expand Down
13 changes: 9 additions & 4 deletions mobile/geth.go
Expand Up @@ -118,10 +118,15 @@ func NewNode(datadir string, config *NodeConfig) (stack *Node, _ error) {

// Create the empty networking stack
nodeConf := &node.Config{
Name: clientIdentifier,
Version: params.Version,
DataDir: datadir,
KeyStoreDir: filepath.Join(datadir, "keystore"), // Mobile should never use internal keystores!
Name: clientIdentifier,
Version: params.Version,
DataDir: datadir,
KeyStoreDir: filepath.Join(datadir, "keystore"), // Mobile should never use internal keystores!
HTTPHost: "localhost",
HTTPPort: 8545,
HTTPVirtualHosts: []string{"localhost"},
HTTPModules: []string{"db", "eth", "net", "web3", "personal"},
IPCPath: "geth.ipc",
P2P: p2p.Config{
NoDiscovery: true,
DiscoveryV5: true,
Expand Down
5 changes: 5 additions & 0 deletions package.json
@@ -0,0 +1,5 @@
{
"name": "@celo/geth",
"version": "0.0.1",
"description": "celo geth"
}

0 comments on commit 5449dc5

Please sign in to comment.