mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-06-06 22:26:47 +00:00
Check rule errors when validating blocks with trusted data (#2171)
This commit is contained in:
parent
d5c10832c2
commit
eec6eb9669
@ -286,8 +286,14 @@ func (flow *handleIBDFlow) processBlockWithTrustedData(
|
|||||||
}
|
}
|
||||||
|
|
||||||
err := consensus.ValidateAndInsertBlockWithTrustedData(blockWithTrustedData, false)
|
err := consensus.ValidateAndInsertBlockWithTrustedData(blockWithTrustedData, false)
|
||||||
|
if err != nil {
|
||||||
|
if errors.As(err, &ruleerrors.RuleError{}) {
|
||||||
|
return protocolerrors.Wrapf(true, err, "failed validating block with trusted data")
|
||||||
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
func (flow *handleIBDFlow) receiveBlockWithTrustedData() (*appmessage.MsgBlockWithTrustedDataV4, bool, error) {
|
func (flow *handleIBDFlow) receiveBlockWithTrustedData() (*appmessage.MsgBlockWithTrustedDataV4, bool, error) {
|
||||||
message, err := flow.incomingRoute.DequeueWithTimeout(common.DefaultTimeout)
|
message, err := flow.incomingRoute.DequeueWithTimeout(common.DefaultTimeout)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user