Skip to content
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

les: prefer nil slices over zero-length slices #19081

Merged
merged 1 commit into from
Jun 27, 2019

Conversation

Matthalp-zz
Copy link
Contributor

Golang best practice is to use a nil slice variable declaration instead of instantiating a zero-length slice [1].

[1] https://github.com/golang/go/wiki/CodeReviewComments#declaring-empty-slices

@karalabe karalabe added this to the 1.9.0 milestone Jun 27, 2019
@karalabe karalabe merged commit 702f52f 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
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.

3 participants