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>
16 lines
324 B
Go
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")
|
|
}
|