mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-25 21:07:18 +00:00
addb3cd665
* Starting, looking for feedbacks * Update error.go * Wrap invalid blocks to rest of the processings * More tests * More tests * Fix tests * Update process_block_test.go * Update execution_engine_test.go * Update BUILD.bazel * Nishant's feedback and Kasey's recommendation * Add comments on what an invalid block is * Update beacon-chain/blockchain/error.go Co-authored-by: Potuz <potuz@prysmaticlabs.com> * Update beacon-chain/blockchain/error.go Co-authored-by: Potuz <potuz@prysmaticlabs.com> * Rm faulty invalid conditions Co-authored-by: Potuz <potuz@prysmaticlabs.com> Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
18 lines
394 B
Go
18 lines
394 B
Go
package blockchain
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/pkg/errors"
|
|
"github.com/prysmaticlabs/prysm/testing/require"
|
|
)
|
|
|
|
func TestIsInvalidBlock(t *testing.T) {
|
|
require.Equal(t, false, IsInvalidBlock(ErrInvalidPayload))
|
|
err := invalidBlock{ErrInvalidPayload}
|
|
require.Equal(t, true, IsInvalidBlock(err))
|
|
|
|
newErr := errors.Wrap(err, "wrap me")
|
|
require.Equal(t, true, IsInvalidBlock(newErr))
|
|
}
|