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

fix(constraints-api): eof error handling logic #4

Merged
merged 3 commits into from
Nov 5, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix: typo
thedevbirb committed Nov 5, 2024
commit 911cda313da427fd57c95da071efb7e83744bb25
2 changes: 1 addition & 1 deletion builder/builder.go
Original file line number Diff line number Diff line change
@@ -277,7 +277,7 @@ func (b *Builder) SubscribeProposerConstraints() error {

// subscribeToRelayForConstraints loops almost indefinitely to subscribe to
// constraints forwarded by relays. If the subscription fails or it is lost, it
// retries every 10 seconds for a max of 10 minutes the restablish the
// retries every 10 seconds for a max of 10 minutes to restablish the
// connection before existing.
func (b *Builder) subscribeToRelayForConstraints(relayBaseEndpoint string) error {
attempts := 0

Unchanged files with check annotations Beta

return accounts.Account{}, errors.New("operation not supported on external signers")
}
func (api *ExternalSigner) SelfDerive(bases []accounts.DerivationPath, chain ethereum.ChainStateReader) {

Check failure on line 152 in accounts/external/backend.go

GitHub Actions / Lint

undefined: ethereum (typecheck)
log.Error("operation SelfDerive not supported on external signers")
}
// An error will be returned if the requested state is not available.
func (db *Database) Reader(blockRoot common.Hash) (database.Reader, error) {
switch b := db.backend.(type) {
case *hashdb.Database:

Check failure on line 129 in triedb/database.go

GitHub Actions / Lint

previous case (typecheck)
return b.Reader(blockRoot)
case *pathdb.Database:
return b.Reader(blockRoot)
deriveNextPaths []accounts.DerivationPath // Next derivation paths for account auto-discovery (multiple bases supported)
deriveNextAddrs []common.Address // Next derived account addresses for auto-discovery (multiple bases supported)
deriveChain ethereum.ChainStateReader // Blockchain state reader to discover used account with

Check failure on line 124 in accounts/scwallet/wallet.go

GitHub Actions / Lint

undefined: ethereum (typecheck)
deriveReq chan chan struct{} // Channel to request a self-derivation on
deriveQuit chan chan error // Channel to terminate the self-deriver with
}
//
// You can disable automatic account discovery by calling SelfDerive with a nil
// chain state reader.
func (w *Wallet) SelfDerive(bases []accounts.DerivationPath, chain ethereum.ChainStateReader) {

Check failure on line 650 in accounts/scwallet/wallet.go

GitHub Actions / Lint

undefined: ethereum (typecheck)
w.lock.Lock()
defer w.lock.Unlock()
var Memsize memsizeui.Handler
var (
verbosityFlag = &cli.IntFlag{

Check failure on line 46 in internal/debug/flags.go

GitHub Actions / Lint

undefined: cli (typecheck)
Name: "verbosity",
Usage: "Logging verbosity: 0=silent, 1=error, 2=warn, 3=info, 4=debug, 5=detail",
Value: 3,
Category: flags.LoggingCategory,
}
logVmoduleFlag = &cli.StringFlag{

Check failure on line 52 in internal/debug/flags.go

GitHub Actions / Lint

undefined: cli (typecheck)
Name: "log.vmodule",
Usage: "Per-module verbosity: comma-separated list of <pattern>=<level> (e.g. eth/*=5,p2p=4)",
Value: "",
Category: flags.LoggingCategory,
}
vmoduleFlag = &cli.StringFlag{

Check failure on line 58 in internal/debug/flags.go

GitHub Actions / Lint

undefined: cli (typecheck)
Name: "vmodule",
Usage: "Per-module verbosity: comma-separated list of <pattern>=<level> (e.g. eth/*=5,p2p=4)",
Value: "",
} else {
context = append(context, "location", filepath.Join(os.TempDir(), "geth-lumberjack.log"))
}
logOutputFile = &lumberjack.Logger{

Check failure on line 213 in internal/debug/flags.go

GitHub Actions / Lint

undefined: lumberjack (typecheck)
Filename: logFile,
MaxSize: ctx.Int(logMaxSizeMBsFlag.Name),
MaxBackups: ctx.Int(logMaxBackupsFlag.Name),
case logFmtFlag == "logfmt":
handler = log.LogfmtHandler(output)
case logFmtFlag == "", logFmtFlag == "terminal":
useColor := (isatty.IsTerminal(os.Stderr.Fd()) || isatty.IsCygwinTerminal(os.Stderr.Fd())) && os.Getenv("TERM") != "dumb"

Check failure on line 242 in internal/debug/flags.go

GitHub Actions / Lint

undefined: isatty (typecheck)
if useColor {
terminalOutput = colorable.NewColorableStderr()
if logOutputFile != nil {
expanded = strings.ReplaceAll(expanded, "&&", "and")
log.Info("Expanded filter expression", "filter", *filter, "expanded", expanded)
expr, err := bexpr.CreateEvaluator(expanded)

Check failure on line 211 in internal/debug/api.go

GitHub Actions / Lint

undefined: bexpr (typecheck)
if err != nil {
log.Error("Failed to parse filter expression", "expanded", expanded, "err", err)
return ""