go-blockchain/consensus/errors_test.go
Claude fa1c127e12
feat(consensus): scaffold package with error types
Add consensus/ package with doc.go and sentinel error types for all
validation failures. Add MaxTransactionBlobSize constant to config.

Co-Authored-By: Charon <charon@lethean.io>
2026-02-21 00:39:41 +00:00

16 lines
324 B
Go

//go:build !integration
package consensus
import (
"errors"
"testing"
"github.com/stretchr/testify/assert"
)
func TestErrors_Good(t *testing.T) {
assert.True(t, errors.Is(ErrTxTooLarge, ErrTxTooLarge))
assert.False(t, errors.Is(ErrTxTooLarge, ErrNoInputs))
assert.Contains(t, ErrTxTooLarge.Error(), "too large")
}