-
Notifications
You must be signed in to change notification settings - Fork 47
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
Simplify register operator avswriter fn #276
Conversation
9997768
to
0f9e40f
Compare
var operatorToAvsRegistrationSigSalt [32]byte | ||
_, err = rand.Read(operatorToAvsRegistrationSigSalt[:]) | ||
if err != nil { | ||
panic(err) |
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.
why Panic? why not return error?
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.
good catch. prob copied from somewhere and forgot to change. 276562a
|
||
curBlockNum, err := w.ethClient.BlockNumber(context.Background()) | ||
if err != nil { | ||
panic(err) |
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.
why panic?
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.
} | ||
curBlock, err := w.ethClient.BlockByNumber(context.Background(), big.NewInt(int64(curBlockNum))) | ||
if err != nil { | ||
panic(err) |
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.
why panic?
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.
276562a
to
6e4a4f3
Compare
Fixes # .
What Changed?
Simplify this function which was needlessly complicated. If users need the low level granularity than they can just use the bindings directly is what Im thinking. Most users of the high level writer client probably just want this to happen and not ask too many questions. That's also my case when writing test cases that use this function.
Reviewer Checklist