-
Notifications
You must be signed in to change notification settings - Fork 222
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
Geth v1.12.2 nits #1099
Merged
Merged
Geth v1.12.2 nits #1099
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
52e2adf
use upstream cmd/utils
ceyonur de2a294
format nits
ceyonur 9dccaf7
accessor chain format nits
ceyonur d392abf
move chain config func to extra file
ceyonur a3e2f7b
rename AvalancheRules to Rules
ceyonur 899f5ff
add transitive deps
ceyonur b7cefd6
remove unnecessary type checks
ceyonur 43ccd94
remove extra lock
ceyonur a753dc7
remove last seen
ceyonur ea6f31d
format: remove avalanche header
ceyonur 0fdf3e8
format: add upstream go-ethereum
ceyonur ffe9024
prepare repo for upstream
ceyonur 848076b
more cosmetic changes to reduce diff
ceyonur bfb38bc
Revert "format: remove avalanche header"
ceyonur 8191f29
Revert "format: add upstream go-ethereum"
ceyonur 182696b
Revert "prepare repo for upstream"
ceyonur 84bc75c
fix func name
ceyonur d4b19a2
readd type checks
ceyonur 8ed4cb8
allow cmd/utils from upstream
ceyonur d432d8f
fix linter
ceyonur 94f2756
Revert "use upstream cmd/utils"
ceyonur feedeaa
Revert "allow cmd/utils from upstream"
ceyonur 4880bfd
split flags file
ceyonur 5e1127d
run UT with race
ceyonur 52a1ee6
remove unneccessary const
ceyonur File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// Copyright 2014 The go-ethereum Authors | ||
// This file is part of go-ethereum. | ||
// | ||
// go-ethereum is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
// | ||
// go-ethereum is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU General Public License | ||
// along with go-ethereum. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
// Package utils contains internal helper functions for go-ethereum commands. | ||
package utils | ||
|
||
import ( | ||
"fmt" | ||
"io" | ||
"os" | ||
"runtime" | ||
) | ||
|
||
// Fatalf formats a message to standard error and exits the program. | ||
// The message is also printed to standard output if standard error | ||
// is redirected to a different file. | ||
func Fatalf(format string, args ...interface{}) { | ||
w := io.MultiWriter(os.Stdout, os.Stderr) | ||
if runtime.GOOS == "windows" { | ||
// The SameFile check below doesn't work on Windows. | ||
// stdout is unlikely to get redirected though, so just print there. | ||
w = os.Stdout | ||
} else { | ||
outf, _ := os.Stdout.Stat() | ||
errf, _ := os.Stderr.Stat() | ||
if outf != nil && errf != nil && os.SameFile(outf, errf) { | ||
w = os.Stderr | ||
} | ||
} | ||
fmt.Fprintf(w, "Fatal: "+format+"\n", args...) | ||
os.Exit(1) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we sure this is safe to remove?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these were fixed way before with ava-labs/coreth@8e32d43#diff-64a06d0cea30e12d6001fb322e583930c1cf3879bca4e8019fa89499ed9f7de4
Also seems like this was only an issue in tests. cc @aaronbuchwald
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also added
-race
flag to UTs to catch these.