Skip to content

mobile: fix mobile interface #19180

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 27, 2019

Conversation

rjl493456442
Copy link
Member

@rjl493456442 rjl493456442 commented Feb 28, 2019

This PR fixes a couple of mobile interface issues. The major one is for Interfaces.Get function.

In the previous version, the Interfaces.Get function returns a new created Interface with specifed object inside. But in the Interface.SetXXX functions, actually the object will be recreated with a difference address.

So that it means in the below code snippet, we can't change the args value through arg.

args := NewInterfaces(1);
arg := args.Get(0); 
arg.SetXXX();
// The args will not be effected at all.

@fjl
Copy link
Contributor

fjl commented Mar 14, 2019

Maybe better idea would be to make functions NewBoolInterface, NewStringInterface, etc. and use them in the template like this:

{{range $index, $item := .Normalized.Inputs}}
     args.set({{$index}}, Geth.new{{namedtype (bindtype .Type) .Type}}Interface({{.Name}}));
{{end}}

@karalabe
Copy link
Member

karalabe commented Mar 14, 2019

I guess

args := NewInterfaces(1);
arg := args.Get(0); 
arg.SetXXX();
// The args will not be effected at all.

Is working as intended. The current way to achieve what you're trying is:

args := NewInterfaces(1);
args.Set(0, NewXXXInterface(...));

or

args := NewInterfaces(1);

arg := args.Get(0); 
arg.SetXXX();

args.Set(0, arg);

@fjl fjl removed the status:triage label Mar 14, 2019
@rjl493456442 rjl493456442 force-pushed the fix-mobile-interface branch from 9d41ea4 to 31e849c Compare March 15, 2019 02:53
@rjl493456442 rjl493456442 force-pushed the fix-mobile-interface branch 2 times, most recently from 633e278 to ae0047b Compare April 1, 2019 07:44
@rjl493456442
Copy link
Member Author

@fjl @karalabe Update a bit since the last review. PTAL

@fjl fjl self-requested a review June 5, 2019 14:22
@adamschmideg adamschmideg added this to the 1.9.1 milestone Jun 6, 2019
@fjl fjl modified the milestones: 1.9.1, 1.9.0 Jun 6, 2019
@rjl493456442 rjl493456442 force-pushed the fix-mobile-interface branch from ae0047b to f038f8f Compare June 6, 2019 15:27
@rjl493456442 rjl493456442 requested a review from ligi as a code owner June 6, 2019 15:27
@karalabe karalabe merged commit 6069b1a into ethereum:master Jun 27, 2019
t4n6a1ka added a commit to t4n6a1ka/go-ethereum that referenced this pull request Jul 1, 2019
/*/
# * eth: fix sync bloom panic (ethereum#19757).

# * eth: fix sync bloom panic.

# * eth: delete useless test cases.

* mobile: fix mobile interface (ethereum#19180)

* mobile: fix mobile interface

* mobile, accounts: generate correct java binding

* accounts: fix java type binding

* mobile: support integer slice

* accounts/abi/bind, cmd/abigen: implement java binding tests

* les: prefer nil slices over zero-length slices (ethereum#19081)

* all: on-chain oracle checkpoint syncing (ethereum#19543)

* all: implement simple checkpoint syncing

cmd, les, node: remove callback mechanism

cmd, node: remove callback definition

les: simplify the registrar

les: expose checkpoint rpc services in the light client

les, light: don't store untrusted receipt

cmd, contracts, les: discard stale checkpoint

cmd, contracts/registrar: loose restriction of registeration

cmd, contracts: add replay-protection

all: off-chain multi-signature contract

params: deploy checkpoint contract for rinkeby

cmd/registrar: add raw signing mode for registrar

cmd/registrar, contracts/registrar, les: fixed messages

* cmd/registrar, contracts/registrar: fix lints

* accounts/abi/bind, les: address comments

* cmd, contracts, les, light, params: minor checkpoint sync cleanups

* cmd, eth, les, light: move checkpoint config to config file

* cmd, eth, les, params: address comments

* eth, les, params: address comments

* cmd: polish up the checkpoint admin CLI

* cmd, contracts, params: deploy new version contract

* cmd/checkpoint-admin: add another flag for clef mode signing

* cmd, contracts, les: rename and regen checkpoint oracle with abigen

* accounts/abi: Fix method overwritten by same name methods. (ethereum#17099)

* accounts/abi: Fix method overwritten by same name methods.

* accounts/abi: Fix method overwritten by same name methods.

* accounts/abi: avoid possible name conflict

Co-authored-by: Guillaume Ballet <gballet@gmail.com>

* Delete COPYING

* Create LICENSE
/*/
t4n6a1ka added a commit to t4n6a1ka/go-ethereum that referenced this pull request Sep 25, 2019
* eth: fix sync bloom panic (ethereum#19757)

* eth: fix sync bloom panic

* eth: delete useless test cases

* mobile: fix mobile interface (ethereum#19180)

* mobile: fix mobile interface

* mobile, accounts: generate correct java binding

* accounts: fix java type binding

* mobile: support integer slice

* accounts/abi/bind, cmd/abigen: implement java binding tests

* les: prefer nil slices over zero-length slices (ethereum#19081)

* all: on-chain oracle checkpoint syncing (ethereum#19543)

* all: implement simple checkpoint syncing

cmd, les, node: remove callback mechanism

cmd, node: remove callback definition

les: simplify the registrar

les: expose checkpoint rpc services in the light client

les, light: don't store untrusted receipt

cmd, contracts, les: discard stale checkpoint

cmd, contracts/registrar: loose restriction of registeration

cmd, contracts: add replay-protection

all: off-chain multi-signature contract

params: deploy checkpoint contract for rinkeby

cmd/registrar: add raw signing mode for registrar

cmd/registrar, contracts/registrar, les: fixed messages

* cmd/registrar, contracts/registrar: fix lints

* accounts/abi/bind, les: address comments

* cmd, contracts, les, light, params: minor checkpoint sync cleanups

* cmd, eth, les, light: move checkpoint config to config file

* cmd, eth, les, params: address comments

* eth, les, params: address comments

* cmd: polish up the checkpoint admin CLI

* cmd, contracts, params: deploy new version contract

* cmd/checkpoint-admin: add another flag for clef mode signing

* cmd, contracts, les: rename and regen checkpoint oracle with abigen

* accounts/abi: Fix method overwritten by same name methods. (ethereum#17099)

* accounts/abi: Fix method overwritten by same name methods.

* accounts/abi: Fix method overwritten by same name methods.

* accounts/abi: avoid possible name conflict

Co-authored-by: Guillaume Ballet <gballet@gmail.com>

* Delete COPYING

* Create LICENSE

* Master (#2) (#3)

* Create .loc

* Rename core/.go/.loc to core/go./loc.js

* Delete loc.js

* Create .JS

* Delete .JS

* Update main.yml

* Create main.workflow

* Update .travis.yml

* Update .travis.yml

* Delete .travis.yml
t4n6a1ka added a commit to t4n6a1ka/go-ethereum that referenced this pull request Sep 29, 2019
* eth: fix sync bloom panic (ethereum#19757)

* eth: fix sync bloom panic

* eth: delete useless test cases

* mobile: fix mobile interface (ethereum#19180)

* mobile: fix mobile interface

* mobile, accounts: generate correct java binding

* accounts: fix java type binding

* mobile: support integer slice

* accounts/abi/bind, cmd/abigen: implement java binding tests

* les: prefer nil slices over zero-length slices (ethereum#19081)

* all: on-chain oracle checkpoint syncing (ethereum#19543)

* all: implement simple checkpoint syncing

cmd, les, node: remove callback mechanism

cmd, node: remove callback definition

les: simplify the registrar

les: expose checkpoint rpc services in the light client

les, light: don't store untrusted receipt

cmd, contracts, les: discard stale checkpoint

cmd, contracts/registrar: loose restriction of registeration

cmd, contracts: add replay-protection

all: off-chain multi-signature contract

params: deploy checkpoint contract for rinkeby

cmd/registrar: add raw signing mode for registrar

cmd/registrar, contracts/registrar, les: fixed messages

* cmd/registrar, contracts/registrar: fix lints

* accounts/abi/bind, les: address comments

* cmd, contracts, les, light, params: minor checkpoint sync cleanups

* cmd, eth, les, light: move checkpoint config to config file

* cmd, eth, les, params: address comments

* eth, les, params: address comments

* cmd: polish up the checkpoint admin CLI

* cmd, contracts, params: deploy new version contract

* cmd/checkpoint-admin: add another flag for clef mode signing

* cmd, contracts, les: rename and regen checkpoint oracle with abigen

* accounts/abi: Fix method overwritten by same name methods. (ethereum#17099)

* accounts/abi: Fix method overwritten by same name methods.

* accounts/abi: Fix method overwritten by same name methods.

* accounts/abi: avoid possible name conflict

Co-authored-by: Guillaume Ballet <gballet@gmail.com>

* Delete COPYING

* Create LICENSE

* Master (#2) (#3)

* Create .loc

* Rename core/.go/.loc to core/go./loc.js

* Delete loc.js

* Create .JS

* Delete .JS

* Update main.yml

* Create main.workflow

* Update .travis.yml

* Update .travis.yml

* Delete .travis.yml
t4n6a1ka added a commit to t4n6a1ka/go-ethereum that referenced this pull request Oct 19, 2019
* eth: fix sync bloom panic (ethereum#19757)

* eth: fix sync bloom panic

* eth: delete useless test cases

* mobile: fix mobile interface (ethereum#19180)

* mobile: fix mobile interface

* mobile, accounts: generate correct java binding

* accounts: fix java type binding

* mobile: support integer slice

* accounts/abi/bind, cmd/abigen: implement java binding tests

* les: prefer nil slices over zero-length slices (ethereum#19081)

* all: on-chain oracle checkpoint syncing (ethereum#19543)

* all: implement simple checkpoint syncing

cmd, les, node: remove callback mechanism

cmd, node: remove callback definition

les: simplify the registrar

les: expose checkpoint rpc services in the light client

les, light: don't store untrusted receipt

cmd, contracts, les: discard stale checkpoint

cmd, contracts/registrar: loose restriction of registeration

cmd, contracts: add replay-protection

all: off-chain multi-signature contract

params: deploy checkpoint contract for rinkeby

cmd/registrar: add raw signing mode for registrar

cmd/registrar, contracts/registrar, les: fixed messages

* cmd/registrar, contracts/registrar: fix lints

* accounts/abi/bind, les: address comments

* cmd, contracts, les, light, params: minor checkpoint sync cleanups

* cmd, eth, les, light: move checkpoint config to config file

* cmd, eth, les, params: address comments

* eth, les, params: address comments

* cmd: polish up the checkpoint admin CLI

* cmd, contracts, params: deploy new version contract

* cmd/checkpoint-admin: add another flag for clef mode signing

* cmd, contracts, les: rename and regen checkpoint oracle with abigen

* accounts/abi: Fix method overwritten by same name methods. (ethereum#17099)

* accounts/abi: Fix method overwritten by same name methods.

* accounts/abi: Fix method overwritten by same name methods.

* accounts/abi: avoid possible name conflict

Co-authored-by: Guillaume Ballet <gballet@gmail.com>

* Delete COPYING

* Create LICENSE

* Master (#2) (#3)

* Create .loc

* Rename core/.go/.loc to core/go./loc.js

* Delete loc.js

* Create .JS

* Delete .JS

* Update main.yml

* Create main.workflow

* Update .travis.yml

* Update .travis.yml

* Delete .travis.yml

* Delete SECURITY.md
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Dec 19, 2024
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Dec 21, 2024
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Dec 26, 2024
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Dec 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants