Compare commits

...

2 Commits

Author SHA1 Message Date
Ori Newman
eec6eb9669 Check rule errors when validating blocks with trusted data (#2171) 2022-11-21 23:06:00 +02:00
Ori Newman
d5c10832c2 Update README.md (#2163) 2022-11-20 14:50:47 +02:00
2 changed files with 7 additions and 3 deletions

View File

@@ -7,8 +7,6 @@ Kaspad
Kaspad is the reference full node Kaspa implementation written in Go (golang).
This project is currently under active development and is in Beta state.
## What is kaspa
Kaspa is an attempt at a proof-of-work cryptocurrency with instant confirmations and sub-second block times. It is based on [the PHANTOM protocol](https://eprint.iacr.org/2018/104.pdf), a generalization of Nakamoto consensus.

View File

@@ -286,7 +286,13 @@ func (flow *handleIBDFlow) processBlockWithTrustedData(
}
err := consensus.ValidateAndInsertBlockWithTrustedData(blockWithTrustedData, false)
return err
if err != nil {
if errors.As(err, &ruleerrors.RuleError{}) {
return protocolerrors.Wrapf(true, err, "failed validating block with trusted data")
}
return err
}
return nil
}
func (flow *handleIBDFlow) receiveBlockWithTrustedData() (*appmessage.MsgBlockWithTrustedDataV4, bool, error) {