diff --git a/internal/mining/error.go b/internal/mining/error.go index bac239bf..a72b62be 100644 --- a/internal/mining/error.go +++ b/internal/mining/error.go @@ -1,4 +1,4 @@ -// Copyright (c) 2015-2020 The Decred developers +// Copyright (c) 2015-2021 The Decred developers // Use of this source code is governed by an ISC // license that can be found in the LICENSE file. @@ -51,6 +51,13 @@ const ( // calculating the associated commitment root for a newly created block // template failed. ErrCalcCommitmentRoot = ErrorKind("ErrCalcCommitmentRoot") + + // ErrGetTicketInfo indicates that ticket information could not be retreived + // in order to connect a transaction. + ErrGetTicketInfo = ErrorKind("ErrGetTicketInfo") + + // ErrSerializeHeader indicates an attempt to serialize a block header failed. + ErrSerializeHeader = ErrorKind("ErrSerializeHeader") ) // Error satisfies the error interface and prints human-readable errors. diff --git a/internal/mining/error_test.go b/internal/mining/error_test.go index 93ba29cf..520ffd00 100644 --- a/internal/mining/error_test.go +++ b/internal/mining/error_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2020 The Decred developers +// Copyright (c) 2020-2021 The Decred developers // Use of this source code is governed by an ISC // license that can be found in the LICENSE file. @@ -26,6 +26,8 @@ func TestErrorKindStringer(t *testing.T) { {ErrFraudProofIndex, "ErrFraudProofIndex"}, {ErrFetchTxStore, "ErrFetchTxStore"}, {ErrCalcCommitmentRoot, "ErrCalcCommitmentRoot"}, + {ErrGetTicketInfo, "ErrGetTicketInfo"}, + {ErrSerializeHeader, "ErrSerializeHeader"}, } for i, test := range tests {