Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions deployments/deployments.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
)

// HardcodedDeployment specifies hardcoded block heights that a deployment
// activates at. If the value is negative, the deployment is either inactive or
// activates at. If the value is negative, the deployment is either inactive or
// can't be determined due to the uniqueness properties of the network.
//
// Since these are hardcoded deployments, and cannot support every possible
Expand Down Expand Up @@ -55,7 +55,7 @@ var DCP0003 = HardcodedDeployment{
}

// Active returns whether the hardcoded deployment is active at height on the
// network specified by params. Active always returns false for unrecognized
// network specified by params. Active always returns false for unrecognized
// networks.
func (d *HardcodedDeployment) Active(height int32, net wire.CurrencyNet) bool {
var activationHeight int32 = -1
Expand Down Expand Up @@ -124,7 +124,7 @@ func DCP0010Active(ctx context.Context, height int32, params *chaincfg.Params,

// DCP0012Active returns whether the consensus rules for the next block with the
// current chain tip height requires the version 2 subsidy split as specified in
// DCP0012. DCP0012 requires the RPC syncer to detect activation on mainnet,
// DCP0012. DCP0012 requires the RPC syncer to detect activation on mainnet,
// testnet3 and simnet.
func DCP0012Active(ctx context.Context, height int32, params *chaincfg.Params,
querier Querier) (bool, error) {
Expand Down
22 changes: 11 additions & 11 deletions errors/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ import (
"strings"
)

// Separator is inserted between nested errors when formatting as strings. The
// default separator produces easily readable multiline errors. Separator may
// Separator is inserted between nested errors when formatting as strings. The
// default separator produces easily readable multiline errors. Separator may
// be modified at init time to create error strings appropriate for logging
// errors on a single line.
var Separator = ":\n\t"

// Error describes an error condition raised within the wallet process. Errors
// Error describes an error condition raised within the wallet process. Errors
// may optionally provide details regarding the operation and class of error for
// assistance in debugging and runtime matching of errors.
type Error struct {
Expand Down Expand Up @@ -148,7 +148,7 @@ func (k Kind) As(target any) bool {
return false
}

// New creates a simple error from a string. New is identical to "errors".New
// New creates a simple error from a string. New is identical to "errors".New
// from the standard library.
func New(text string) error {
return errors.New(text)
Expand All @@ -162,20 +162,20 @@ func Errorf(format string, args ...any) error {

// E creates an *Error from one or more arguments.
//
// Each argument type is inspected when constructing the error. If multiple
// args of similar type are passed, the final arg is recorded. The following
// Each argument type is inspected when constructing the error. If multiple
// args of similar type are passed, the final arg is recorded. The following
// types are recognized:
//
// errors.Op
// The operation, method, or RPC which was invoked.
// errors.Kind
// The class of error.
// string
// Description of the error condition. String types populate the
// Description of the error condition. String types populate the
// Err field and overwrite, and are overwritten by, other arguments
// which implement the error interface.
// error
// The underlying error. If the error is an *Error, the Op and Kind
// The underlying error. If the error is an *Error, the Op and Kind
// will be promoted to the newly created error if not set to another
// value in the args.
//
Expand Down Expand Up @@ -211,7 +211,7 @@ func E(args ...any) error {
}

// Promote the Op and Kind of the nested Error to the newly created error,
// if these fields were not part of the args. This improves matching
// if these fields were not part of the args. This improves matching
// capabilities as well as improving the order of these fields in the
// formatted error.
if e.Err == prev && prev != nil {
Expand All @@ -237,7 +237,7 @@ func E(args ...any) error {

// WithStack is identical to E but includes a stacktrace with the error. Stack
// traces do not appear in formatted error strings and are not compared when
// matching errors. Stack traces are extracted from errors using Stacks.
// matching errors. Stack traces are extracted from errors using Stacks.
func WithStack(args ...any) error {
err := E(args...).(*Error)
err.stack = debug.Stack()
Expand Down Expand Up @@ -343,7 +343,7 @@ func Is(err, target error) bool {
}

// As attempts to assign the error pointed to by target with the first error in
// err's error chain with a compatible type. Returns true if target is
// err's error chain with a compatible type. Returns true if target is
// assigned.
func As(err error, target any) bool {
return errors.As(err, target)
Expand Down