Skip to content

Commit

Permalink
Merge pull request ethereum#77 from enriquefynn/geth-sharding
Browse files Browse the repository at this point in the history
sync with upstream
  • Loading branch information
enriquefynn authored Mar 24, 2018
2 parents 6993b27 + 41ad318 commit 173fda2
Show file tree
Hide file tree
Showing 301 changed files with 25,119 additions and 14,809 deletions.
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,8 @@ accounts/usbwallet @karalabe
consensus @karalabe
core/ @karalabe @holiman
eth/ @karalabe
les/ @zsfelfoldi
light/ @zsfelfoldi
mobile/ @karalabe
p2p/ @fjl @zsfelfoldi
whisper/ @gballet @gluk256
11 changes: 11 additions & 0 deletions .github/no-response.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Number of days of inactivity before an Issue is closed for lack of response
daysUntilClose: 30
# Label requiring a response
responseRequiredLabel: more-information-needed
# Comment to post when closing an Issue for lack of response. Set to `false` to disable
closeComment: >
This issue has been automatically closed because there has been no response
to our request for more information from the original author. With only the
information that is currently in the issue, we don't have enough information
to take action. Please reach out if you have or find the answers we need so
that we can investigate further.
17 changes: 17 additions & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 366
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 42
# Issues with these labels will never be considered stale
exemptLabels:
- pinned
- security
# Label to use when marking an issue as stale
staleLabel: stale
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,14 @@ profile.cov
# IdeaIDE
.idea

# VS Code
.vscode

# dashboard
/dashboard/assets/flow-typed
/dashboard/assets/node_modules
/dashboard/assets/stats.json
/dashboard/assets/bundle.js
/dashboard/assets/package-lock.json

**/yarn-error.log
19 changes: 4 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,7 @@ matrix:
- os: linux
dist: trusty
sudo: required
go: 1.7.x
script:
- sudo modprobe fuse
- sudo chmod 666 /dev/fuse
- sudo chown root:$USER /etc/fuse.conf
- go run build/ci.go install
- go run build/ci.go test -coverage

- os: linux
dist: trusty
sudo: required
go: 1.8.x
go: 1.9.x
script:
- sudo modprobe fuse
- sudo chmod 666 /dev/fuse
Expand All @@ -29,7 +18,7 @@ matrix:
- os: linux
dist: trusty
sudo: required
go: 1.9.x
go: "1.10"
script:
- sudo modprobe fuse
- sudo chmod 666 /dev/fuse
Expand All @@ -38,7 +27,7 @@ matrix:
- go run build/ci.go test -coverage

- os: osx
go: 1.9.x
go: "1.10"
script:
- unset -f cd # workaround for https:/travis-ci/travis-ci/issues/8703
- brew update
Expand All @@ -50,7 +39,7 @@ matrix:
# This builder only tests code linters on latest version of Go
- os: linux
dist: trusty
go: 1.9.x
go: "1.10"
env:
- lint
git:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build Geth in a stock Go builder container
FROM golang:1.9-alpine as builder
FROM golang:1.10-alpine as builder

RUN apk add --no-cache make gcc musl-dev linux-headers

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.alltools
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build Geth in a stock Go builder container
FROM golang:1.9-alpine as builder
FROM golang:1.10-alpine as builder

RUN apk add --no-cache make gcc musl-dev linux-headers

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.8.2
1.8.3
8 changes: 4 additions & 4 deletions accounts/abi/abi.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func (abi ABI) Unpack(v interface{}, name string, output []byte) (err error) {
}
return method.Outputs.Unpack(v, output)
} else if event, ok := abi.Events[name]; ok {
return event.Inputs.unpackTuple(v, output)
return event.Inputs.Unpack(v, output)
}
return fmt.Errorf("abi: could not locate named method or event")
}
Expand Down Expand Up @@ -136,11 +136,11 @@ func (abi *ABI) UnmarshalJSON(data []byte) error {

// MethodById looks up a method by the 4-byte id
// returns nil if none found
func (abi *ABI) MethodById(sigdata []byte) *Method {
func (abi *ABI) MethodById(sigdata []byte) (*Method, error) {
for _, method := range abi.Methods {
if bytes.Equal(method.Id(), sigdata[:4]) {
return &method
return &method, nil
}
}
return nil
return nil, fmt.Errorf("no method with id: %#x", sigdata[:4])
}
6 changes: 5 additions & 1 deletion accounts/abi/abi_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,11 @@ func TestABI_MethodById(t *testing.T) {
}
for name, m := range abi.Methods {
a := fmt.Sprintf("%v", m)
b := fmt.Sprintf("%v", abi.MethodById(m.Id()))
m2, err := abi.MethodById(m.Id())
if err != nil {
t.Fatalf("Failed to look up ABI method: %v", err)
}
b := fmt.Sprintf("%v", m2)
if a != b {
t.Errorf("Method %v (id %v) not 'findable' by id in ABI", name, common.ToHex(m.Id()))
}
Expand Down
Loading

0 comments on commit 173fda2

Please sign in to comment.