-
Notifications
You must be signed in to change notification settings - Fork 82
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
feat(fraud): extend fraud information upon detection #1237
Conversation
…ymint into srene/hardfork-fix
…ymint into srene/hardfork-fix
Co-authored-by: Sergi Rene <[email protected]>
…crease-fraud-information
types/errors.go
Outdated
} | ||
|
||
func NewErrInvalidHeaderDataHashFraud(expected [32]byte, actual [32]byte) error { | ||
func NewErrInvalidHeaderDataHashFraud(expected [32]byte, actual [32]byte, header Header) error { | ||
return &ErrInvalidHeaderDataHashFraud{ | ||
Expected: expected, |
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.
actual
is redundant. same as header.DataHash
types/errors.go
Outdated
Proposer []byte | ||
} | ||
|
||
// NewErrFraudAppHashMismatch creates a new ErrFraudAppHashMismatch error. | ||
func NewErrFraudAppHashMismatch(expected [32]byte, actual [32]byte, block *Block) error { | ||
func NewErrFraudAppHashMismatch(expected [32]byte, block *Block) 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.
can use Header
instead of Block
types/errors.go
Outdated
@@ -38,10 +38,12 @@ type ErrFraudHeightMismatch struct { | |||
} | |||
|
|||
// NewErrFraudHeightMismatch creates a new ErrFraudHeightMismatch error. | |||
func NewErrFraudHeightMismatch(expected uint64, actual uint64, block *Block) error { | |||
func NewErrFraudHeightMismatch(expected uint64, block *Block) 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.
can use Header
instead of Block
types/errors.go
Outdated
@@ -91,8 +99,10 @@ type ErrLastResultsHashMismatch struct { | |||
// NewErrLastResultsHashMismatch creates a new ErrLastResultsHashMismatch error. | |||
func NewErrLastResultsHashMismatch(expected [32]byte, block *Block) 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.
can use Header
instead of Block
PR Standards
Opening a pull request should be able to meet the following requirements
--
PR naming convention: https://hackmd.io/@nZpxHZ0CT7O5ngTp0TP9mg/HJP_jrm7A
Close #1156
<-- Briefly describe the content of this pull request -->
For Author:
godoc
commentsFor Reviewer:
After reviewer approval: