-
Notifications
You must be signed in to change notification settings - Fork 114
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
[CT-520] Validatebasic for new MsgBatchCancel #1101
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ import ( | |
|
||
var _ sdk.Msg = &MsgBatchCancel{} | ||
|
||
// NewMsgCancelOrderShortTerm constructs a MsgBatchCancel from an `OrderId` and a `GoodTilBlock`. | ||
// NewMsgBatchCancel constructs a MsgBatchCancel. | ||
func NewMsgBatchCancel(subaccountId types.SubaccountId, cancelBatch []OrderBatch, goodTilBlock uint32) *MsgBatchCancel { | ||
return &MsgBatchCancel{ | ||
SubaccountId: subaccountId, | ||
|
@@ -18,7 +18,7 @@ func NewMsgBatchCancel(subaccountId types.SubaccountId, cancelBatch []OrderBatch | |
} | ||
} | ||
|
||
// ValidateBasic performs stateless validation for | ||
// ValidateBasic performs stateless validation for the `MsgBatchCancel` msg. | ||
func (msg *MsgBatchCancel) ValidateBasic() (err error) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. so ValidateBasic is actually optional as of v0.50 - I think it's still supported for backwards compatibility but can you maybe spend 10-15 minutes to see how it works w/ the new version and what was the motivation? kind of curious about this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. just wondering if transactions that are obviously wrong (e.g. failing ValidateBasic) can now enter mempool and be included in a block There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Seems like they have moved all validation to the msg server. Example PRS Based on this comment |
||
subaccountId := msg.GetSubaccountId() | ||
if err := subaccountId.Validate(); err != nil { | ||
|
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.
for my understanding - did we decide to set to to 100 or 1000?
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.
https://dydx-team.slack.com/archives/C06JZMTFACV/p1708985170576359?thread_ts=1708970027.055389&cid=C06JZMTFACV
We can change this as needed later.