aboutsummaryrefslogtreecommitdiffstats
path: root/mobile/geth.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2016-12-08 20:09:26 +0800
committerFelix Lange <fjl@twurst.com>2016-12-08 20:09:26 +0800
commit0fe35b907addf1c066cb4d7c717bb23f9f2e7be4 (patch)
treece23037c4256b7c1ec4561d7477c33b328aa81e8 /mobile/geth.go
parent3fc7c978277051391f8ea7831559e9f4f83c3166 (diff)
downloadgo-tangerine-0fe35b907addf1c066cb4d7c717bb23f9f2e7be4.tar
go-tangerine-0fe35b907addf1c066cb4d7c717bb23f9f2e7be4.tar.gz
go-tangerine-0fe35b907addf1c066cb4d7c717bb23f9f2e7be4.tar.bz2
go-tangerine-0fe35b907addf1c066cb4d7c717bb23f9f2e7be4.tar.lz
go-tangerine-0fe35b907addf1c066cb4d7c717bb23f9f2e7be4.tar.xz
go-tangerine-0fe35b907addf1c066cb4d7c717bb23f9f2e7be4.tar.zst
go-tangerine-0fe35b907addf1c066cb4d7c717bb23f9f2e7be4.zip
mobile: iOS naming and API fixes for generators and Swift (#3408)
* build: modify the iOS namespace to iGeth (gomobile limitation) * mobile: assign names to return types for ObjC wrapper * mobile: use more expanded names for iOS/Swift API
Diffstat (limited to 'mobile/geth.go')
-rw-r--r--mobile/geth.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/mobile/geth.go b/mobile/geth.go
index 7ea4b2f65..af0054cdc 100644
--- a/mobile/geth.go
+++ b/mobile/geth.go
@@ -99,7 +99,7 @@ type Node struct {
}
// NewNode creates and configures a new Geth node.
-func NewNode(datadir string, config *NodeConfig) (*Node, error) {
+func NewNode(datadir string, config *NodeConfig) (stack *Node, _ error) {
// If no or partial configurations were specified, use defaults
if config == nil {
config = NewNodeConfig()
@@ -124,7 +124,7 @@ func NewNode(datadir string, config *NodeConfig) (*Node, error) {
NAT: nat.Any(),
MaxPeers: config.MaxPeers,
}
- stack, err := node.New(nodeConf)
+ rawStack, err := node.New(nodeConf)
if err != nil {
return nil, err
}
@@ -153,14 +153,14 @@ func NewNode(datadir string, config *NodeConfig) (*Node, error) {
GpobaseStepUp: 100,
GpobaseCorrectionFactor: 110,
}
- if err := stack.Register(func(ctx *node.ServiceContext) (node.Service, error) {
+ if err := rawStack.Register(func(ctx *node.ServiceContext) (node.Service, error) {
return les.New(ctx, ethConf)
}); err != nil {
return nil, fmt.Errorf("ethereum init: %v", err)
}
// If netstats reporting is requested, do it
if config.EthereumNetStats != "" {
- if err := stack.Register(func(ctx *node.ServiceContext) (node.Service, error) {
+ if err := rawStack.Register(func(ctx *node.ServiceContext) (node.Service, error) {
var lesServ *les.LightEthereum
ctx.Service(&lesServ)
@@ -172,11 +172,11 @@ func NewNode(datadir string, config *NodeConfig) (*Node, error) {
}
// Register the Whisper protocol if requested
if config.WhisperEnabled {
- if err := stack.Register(func(*node.ServiceContext) (node.Service, error) { return whisperv2.New(), nil }); err != nil {
+ if err := rawStack.Register(func(*node.ServiceContext) (node.Service, error) { return whisperv2.New(), nil }); err != nil {
return nil, fmt.Errorf("whisper init: %v", err)
}
}
- return &Node{stack}, nil
+ return &Node{rawStack}, nil
}
// Start creates a live P2P node and starts running it.
@@ -191,7 +191,7 @@ func (n *Node) Stop() error {
}
// GetEthereumClient retrieves a client to access the Ethereum subsystem.
-func (n *Node) GetEthereumClient() (*EthereumClient, error) {
+func (n *Node) GetEthereumClient() (client *EthereumClient, _ error) {
rpc, err := n.node.Attach()
if err != nil {
return nil, err