// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.10
// 	protoc        v6.32.1
// source: errors/error.proto

package errors

import (
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	reflect "reflect"
	sync "sync"
	unsafe "unsafe"
)

const (
	// Verify that this generated code is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
	// Verify that runtime/protoimpl is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)

type ERR int32

const (
	// General errors 0-9
	ERR_UNKNOWN            ERR = 0
	ERR_INVALID_ARGUMENT   ERR = 1
	ERR_THRESHOLD_EXCEEDED ERR = 2
	ERR_NOT_FOUND          ERR = 3
	ERR_PROCESSING         ERR = 4
	ERR_CONFIGURATION      ERR = 5
	ERR_CONTEXT            ERR = 6
	ERR_CONTEXT_CANCELED   ERR = 7
	ERR_EXTERNAL           ERR = 8
	ERR_ERROR              ERR = 9
	// Block errors 10-19
	ERR_BLOCK_NOT_FOUND               ERR = 10
	ERR_BLOCK_INVALID                 ERR = 11
	ERR_BLOCK_EXISTS                  ERR = 12
	ERR_BLOCK_INVALID_FORMAT          ERR = 13
	ERR_BLOCK_PARENT_NOT_MINED        ERR = 14
	ERR_BLOCK_COINBASE_MISSING_HEIGHT ERR = 15
	ERR_BLOCK_ASSEMBLY_RESET          ERR = 16
	ERR_BLOCK_ERROR                   ERR = 19
	// Subtree errors 20-29
	ERR_SUBTREE_NOT_FOUND         ERR = 20
	ERR_SUBTREE_INVALID           ERR = 21
	ERR_SUBTREE_SERIALIZE_ERROR   ERR = 22
	ERR_SUBTREE_DESERIALIZE_ERROR ERR = 23
	ERR_SUBTREE_INVALID_FORMAT    ERR = 24
	ERR_SUBTREE_EXISTS            ERR = 25
	ERR_SUBTREE_ERROR             ERR = 29
	// Transaction errors 30-49
	ERR_TX_NOT_FOUND            ERR = 30
	ERR_TX_INVALID              ERR = 31
	ERR_TX_INVALID_DOUBLE_SPEND ERR = 32
	ERR_TX_EXISTS               ERR = 33
	ERR_TX_MISSING_PARENT       ERR = 34
	ERR_TX_LOCK_TIME            ERR = 35
	ERR_TX_CONFLICTING          ERR = 36
	ERR_TX_LOCKED               ERR = 37
	ERR_TX_COINBASE_IMMATURE    ERR = 38
	ERR_TX_POLICY               ERR = 39
	ERR_TX_CONSENSUS            ERR = 40
	ERR_TX_ERROR                ERR = 49
	// Service errors 50-59
	ERR_SERVICE_UNAVAILABLE ERR = 50
	ERR_SERVICE_NOT_STARTED ERR = 51
	ERR_SERVICE_ERROR       ERR = 59
	// Storage errors 60-69
	ERR_STORAGE_UNAVAILABLE ERR = 60
	ERR_STORAGE_NOT_STARTED ERR = 61
	ERR_STORAGE_ERROR       ERR = 69
	// UTXO errors 70-79
	ERR_UTXO_SPENT        ERR = 70
	ERR_UTXO_NON_FINAL    ERR = 71
	ERR_UTXO_FROZEN       ERR = 72
	ERR_UTXO_NOT_FOUND    ERR = 73
	ERR_UTXO_MISMATCH     ERR = 74
	ERR_UTXO_INVALID_SIZE ERR = 75
	ERR_UTXO_ERROR        ERR = 79
	// Kafka errors 80-89
	ERR_KAFKA_DECODE_ERROR ERR = 80
	ERR_KAFKA_ERROR        ERR = 89
	// Blob errors 90-99
	ERR_BLOB_EXISTS               ERR = 90
	ERR_BLOB_NOT_FOUND            ERR = 91
	ERR_BLOB_FOOTER_SIZE_MISMATCH ERR = 92
	ERR_BLOB_ERROR                ERR = 99
	// State errors 100-109
	ERR_STATE_INITIALIZATION ERR = 100
	ERR_STATE_ERROR          ERR = 109
	// Network errors 110-119
	ERR_NETWORK_ERROR              ERR = 110
	ERR_INVALID_SUBNET             ERR = 111
	ERR_INVALID_IP                 ERR = 112
	ERR_NETWORK_TIMEOUT            ERR = 113
	ERR_NETWORK_CONNECTION_REFUSED ERR = 114
	ERR_NETWORK_INVALID_RESPONSE   ERR = 115
	ERR_NETWORK_PEER_MALICIOUS     ERR = 116
)

// Enum value maps for ERR.
var (
	ERR_name = map[int32]string{
		0:   "UNKNOWN",
		1:   "INVALID_ARGUMENT",
		2:   "THRESHOLD_EXCEEDED",
		3:   "NOT_FOUND",
		4:   "PROCESSING",
		5:   "CONFIGURATION",
		6:   "CONTEXT",
		7:   "CONTEXT_CANCELED",
		8:   "EXTERNAL",
		9:   "ERROR",
		10:  "BLOCK_NOT_FOUND",
		11:  "BLOCK_INVALID",
		12:  "BLOCK_EXISTS",
		13:  "BLOCK_INVALID_FORMAT",
		14:  "BLOCK_PARENT_NOT_MINED",
		15:  "BLOCK_COINBASE_MISSING_HEIGHT",
		16:  "BLOCK_ASSEMBLY_RESET",
		19:  "BLOCK_ERROR",
		20:  "SUBTREE_NOT_FOUND",
		21:  "SUBTREE_INVALID",
		22:  "SUBTREE_SERIALIZE_ERROR",
		23:  "SUBTREE_DESERIALIZE_ERROR",
		24:  "SUBTREE_INVALID_FORMAT",
		25:  "SUBTREE_EXISTS",
		29:  "SUBTREE_ERROR",
		30:  "TX_NOT_FOUND",
		31:  "TX_INVALID",
		32:  "TX_INVALID_DOUBLE_SPEND",
		33:  "TX_EXISTS",
		34:  "TX_MISSING_PARENT",
		35:  "TX_LOCK_TIME",
		36:  "TX_CONFLICTING",
		37:  "TX_LOCKED",
		38:  "TX_COINBASE_IMMATURE",
		39:  "TX_POLICY",
		40:  "TX_CONSENSUS",
		49:  "TX_ERROR",
		50:  "SERVICE_UNAVAILABLE",
		51:  "SERVICE_NOT_STARTED",
		59:  "SERVICE_ERROR",
		60:  "STORAGE_UNAVAILABLE",
		61:  "STORAGE_NOT_STARTED",
		69:  "STORAGE_ERROR",
		70:  "UTXO_SPENT",
		71:  "UTXO_NON_FINAL",
		72:  "UTXO_FROZEN",
		73:  "UTXO_NOT_FOUND",
		74:  "UTXO_MISMATCH",
		75:  "UTXO_INVALID_SIZE",
		79:  "UTXO_ERROR",
		80:  "KAFKA_DECODE_ERROR",
		89:  "KAFKA_ERROR",
		90:  "BLOB_EXISTS",
		91:  "BLOB_NOT_FOUND",
		92:  "BLOB_FOOTER_SIZE_MISMATCH",
		99:  "BLOB_ERROR",
		100: "STATE_INITIALIZATION",
		109: "STATE_ERROR",
		110: "NETWORK_ERROR",
		111: "INVALID_SUBNET",
		112: "INVALID_IP",
		113: "NETWORK_TIMEOUT",
		114: "NETWORK_CONNECTION_REFUSED",
		115: "NETWORK_INVALID_RESPONSE",
		116: "NETWORK_PEER_MALICIOUS",
	}
	ERR_value = map[string]int32{
		"UNKNOWN":                       0,
		"INVALID_ARGUMENT":              1,
		"THRESHOLD_EXCEEDED":            2,
		"NOT_FOUND":                     3,
		"PROCESSING":                    4,
		"CONFIGURATION":                 5,
		"CONTEXT":                       6,
		"CONTEXT_CANCELED":              7,
		"EXTERNAL":                      8,
		"ERROR":                         9,
		"BLOCK_NOT_FOUND":               10,
		"BLOCK_INVALID":                 11,
		"BLOCK_EXISTS":                  12,
		"BLOCK_INVALID_FORMAT":          13,
		"BLOCK_PARENT_NOT_MINED":        14,
		"BLOCK_COINBASE_MISSING_HEIGHT": 15,
		"BLOCK_ASSEMBLY_RESET":          16,
		"BLOCK_ERROR":                   19,
		"SUBTREE_NOT_FOUND":             20,
		"SUBTREE_INVALID":               21,
		"SUBTREE_SERIALIZE_ERROR":       22,
		"SUBTREE_DESERIALIZE_ERROR":     23,
		"SUBTREE_INVALID_FORMAT":        24,
		"SUBTREE_EXISTS":                25,
		"SUBTREE_ERROR":                 29,
		"TX_NOT_FOUND":                  30,
		"TX_INVALID":                    31,
		"TX_INVALID_DOUBLE_SPEND":       32,
		"TX_EXISTS":                     33,
		"TX_MISSING_PARENT":             34,
		"TX_LOCK_TIME":                  35,
		"TX_CONFLICTING":                36,
		"TX_LOCKED":                     37,
		"TX_COINBASE_IMMATURE":          38,
		"TX_POLICY":                     39,
		"TX_CONSENSUS":                  40,
		"TX_ERROR":                      49,
		"SERVICE_UNAVAILABLE":           50,
		"SERVICE_NOT_STARTED":           51,
		"SERVICE_ERROR":                 59,
		"STORAGE_UNAVAILABLE":           60,
		"STORAGE_NOT_STARTED":           61,
		"STORAGE_ERROR":                 69,
		"UTXO_SPENT":                    70,
		"UTXO_NON_FINAL":                71,
		"UTXO_FROZEN":                   72,
		"UTXO_NOT_FOUND":                73,
		"UTXO_MISMATCH":                 74,
		"UTXO_INVALID_SIZE":             75,
		"UTXO_ERROR":                    79,
		"KAFKA_DECODE_ERROR":            80,
		"KAFKA_ERROR":                   89,
		"BLOB_EXISTS":                   90,
		"BLOB_NOT_FOUND":                91,
		"BLOB_FOOTER_SIZE_MISMATCH":     92,
		"BLOB_ERROR":                    99,
		"STATE_INITIALIZATION":          100,
		"STATE_ERROR":                   109,
		"NETWORK_ERROR":                 110,
		"INVALID_SUBNET":                111,
		"INVALID_IP":                    112,
		"NETWORK_TIMEOUT":               113,
		"NETWORK_CONNECTION_REFUSED":    114,
		"NETWORK_INVALID_RESPONSE":      115,
		"NETWORK_PEER_MALICIOUS":        116,
	}
)

func (x ERR) Enum() *ERR {
	p := new(ERR)
	*p = x
	return p
}

func (x ERR) String() string {
	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}

func (ERR) Descriptor() protoreflect.EnumDescriptor {
	return file_errors_error_proto_enumTypes[0].Descriptor()
}

func (ERR) Type() protoreflect.EnumType {
	return &file_errors_error_proto_enumTypes[0]
}

func (x ERR) Number() protoreflect.EnumNumber {
	return protoreflect.EnumNumber(x)
}

// Deprecated: Use ERR.Descriptor instead.
func (ERR) EnumDescriptor() ([]byte, []int) {
	return file_errors_error_proto_rawDescGZIP(), []int{0}
}

type TError struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	Code          ERR                    `protobuf:"varint,1,opt,name=code,proto3,enum=errors.ERR" json:"code,omitempty"`
	Message       string                 `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	Data          []byte                 `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	WrappedError  *TError                `protobuf:"bytes,4,opt,name=wrappedError,proto3" json:"wrappedError,omitempty"`
	File          string                 `protobuf:"bytes,5,opt,name=file,proto3" json:"file,omitempty"`
	Line          int32                  `protobuf:"varint,6,opt,name=line,proto3" json:"line,omitempty"`
	Function      string                 `protobuf:"bytes,7,opt,name=function,proto3" json:"function,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *TError) Reset() {
	*x = TError{}
	mi := &file_errors_error_proto_msgTypes[0]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *TError) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*TError) ProtoMessage() {}

func (x *TError) ProtoReflect() protoreflect.Message {
	mi := &file_errors_error_proto_msgTypes[0]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use TError.ProtoReflect.Descriptor instead.
func (*TError) Descriptor() ([]byte, []int) {
	return file_errors_error_proto_rawDescGZIP(), []int{0}
}

func (x *TError) GetCode() ERR {
	if x != nil {
		return x.Code
	}
	return ERR_UNKNOWN
}

func (x *TError) GetMessage() string {
	if x != nil {
		return x.Message
	}
	return ""
}

func (x *TError) GetData() []byte {
	if x != nil {
		return x.Data
	}
	return nil
}

func (x *TError) GetWrappedError() *TError {
	if x != nil {
		return x.WrappedError
	}
	return nil
}

func (x *TError) GetFile() string {
	if x != nil {
		return x.File
	}
	return ""
}

func (x *TError) GetLine() int32 {
	if x != nil {
		return x.Line
	}
	return 0
}

func (x *TError) GetFunction() string {
	if x != nil {
		return x.Function
	}
	return ""
}

var File_errors_error_proto protoreflect.FileDescriptor

const file_errors_error_proto_rawDesc = "" +
	"\n" +
	"\x12errors/error.proto\x12\x06errors\"\xcf\x01\n" +
	"\x06TError\x12\x1f\n" +
	"\x04code\x18\x01 \x01(\x0e2\v.errors.ERRR\x04code\x12\x18\n" +
	"\amessage\x18\x02 \x01(\tR\amessage\x12\x12\n" +
	"\x04data\x18\x03 \x01(\fR\x04data\x122\n" +
	"\fwrappedError\x18\x04 \x01(\v2\x0e.errors.TErrorR\fwrappedError\x12\x12\n" +
	"\x04file\x18\x05 \x01(\tR\x04file\x12\x12\n" +
	"\x04line\x18\x06 \x01(\x05R\x04line\x12\x1a\n" +
	"\bfunction\x18\a \x01(\tR\bfunction*\xd5\n" +
	"\n" +
	"\x03ERR\x12\v\n" +
	"\aUNKNOWN\x10\x00\x12\x14\n" +
	"\x10INVALID_ARGUMENT\x10\x01\x12\x16\n" +
	"\x12THRESHOLD_EXCEEDED\x10\x02\x12\r\n" +
	"\tNOT_FOUND\x10\x03\x12\x0e\n" +
	"\n" +
	"PROCESSING\x10\x04\x12\x11\n" +
	"\rCONFIGURATION\x10\x05\x12\v\n" +
	"\aCONTEXT\x10\x06\x12\x14\n" +
	"\x10CONTEXT_CANCELED\x10\a\x12\f\n" +
	"\bEXTERNAL\x10\b\x12\t\n" +
	"\x05ERROR\x10\t\x12\x13\n" +
	"\x0fBLOCK_NOT_FOUND\x10\n" +
	"\x12\x11\n" +
	"\rBLOCK_INVALID\x10\v\x12\x10\n" +
	"\fBLOCK_EXISTS\x10\f\x12\x18\n" +
	"\x14BLOCK_INVALID_FORMAT\x10\r\x12\x1a\n" +
	"\x16BLOCK_PARENT_NOT_MINED\x10\x0e\x12!\n" +
	"\x1dBLOCK_COINBASE_MISSING_HEIGHT\x10\x0f\x12\x18\n" +
	"\x14BLOCK_ASSEMBLY_RESET\x10\x10\x12\x0f\n" +
	"\vBLOCK_ERROR\x10\x13\x12\x15\n" +
	"\x11SUBTREE_NOT_FOUND\x10\x14\x12\x13\n" +
	"\x0fSUBTREE_INVALID\x10\x15\x12\x1b\n" +
	"\x17SUBTREE_SERIALIZE_ERROR\x10\x16\x12\x1d\n" +
	"\x19SUBTREE_DESERIALIZE_ERROR\x10\x17\x12\x1a\n" +
	"\x16SUBTREE_INVALID_FORMAT\x10\x18\x12\x12\n" +
	"\x0eSUBTREE_EXISTS\x10\x19\x12\x11\n" +
	"\rSUBTREE_ERROR\x10\x1d\x12\x10\n" +
	"\fTX_NOT_FOUND\x10\x1e\x12\x0e\n" +
	"\n" +
	"TX_INVALID\x10\x1f\x12\x1b\n" +
	"\x17TX_INVALID_DOUBLE_SPEND\x10 \x12\r\n" +
	"\tTX_EXISTS\x10!\x12\x15\n" +
	"\x11TX_MISSING_PARENT\x10\"\x12\x10\n" +
	"\fTX_LOCK_TIME\x10#\x12\x12\n" +
	"\x0eTX_CONFLICTING\x10$\x12\r\n" +
	"\tTX_LOCKED\x10%\x12\x18\n" +
	"\x14TX_COINBASE_IMMATURE\x10&\x12\r\n" +
	"\tTX_POLICY\x10'\x12\x10\n" +
	"\fTX_CONSENSUS\x10(\x12\f\n" +
	"\bTX_ERROR\x101\x12\x17\n" +
	"\x13SERVICE_UNAVAILABLE\x102\x12\x17\n" +
	"\x13SERVICE_NOT_STARTED\x103\x12\x11\n" +
	"\rSERVICE_ERROR\x10;\x12\x17\n" +
	"\x13STORAGE_UNAVAILABLE\x10<\x12\x17\n" +
	"\x13STORAGE_NOT_STARTED\x10=\x12\x11\n" +
	"\rSTORAGE_ERROR\x10E\x12\x0e\n" +
	"\n" +
	"UTXO_SPENT\x10F\x12\x12\n" +
	"\x0eUTXO_NON_FINAL\x10G\x12\x0f\n" +
	"\vUTXO_FROZEN\x10H\x12\x12\n" +
	"\x0eUTXO_NOT_FOUND\x10I\x12\x11\n" +
	"\rUTXO_MISMATCH\x10J\x12\x15\n" +
	"\x11UTXO_INVALID_SIZE\x10K\x12\x0e\n" +
	"\n" +
	"UTXO_ERROR\x10O\x12\x16\n" +
	"\x12KAFKA_DECODE_ERROR\x10P\x12\x0f\n" +
	"\vKAFKA_ERROR\x10Y\x12\x0f\n" +
	"\vBLOB_EXISTS\x10Z\x12\x12\n" +
	"\x0eBLOB_NOT_FOUND\x10[\x12\x1d\n" +
	"\x19BLOB_FOOTER_SIZE_MISMATCH\x10\\\x12\x0e\n" +
	"\n" +
	"BLOB_ERROR\x10c\x12\x18\n" +
	"\x14STATE_INITIALIZATION\x10d\x12\x0f\n" +
	"\vSTATE_ERROR\x10m\x12\x11\n" +
	"\rNETWORK_ERROR\x10n\x12\x12\n" +
	"\x0eINVALID_SUBNET\x10o\x12\x0e\n" +
	"\n" +
	"INVALID_IP\x10p\x12\x13\n" +
	"\x0fNETWORK_TIMEOUT\x10q\x12\x1e\n" +
	"\x1aNETWORK_CONNECTION_REFUSED\x10r\x12\x1c\n" +
	"\x18NETWORK_INVALID_RESPONSE\x10s\x12\x1a\n" +
	"\x16NETWORK_PEER_MALICIOUS\x10tB+Z)github.com/bsv-blockchain/teranode/errorsb\x06proto3"

var (
	file_errors_error_proto_rawDescOnce sync.Once
	file_errors_error_proto_rawDescData []byte
)

func file_errors_error_proto_rawDescGZIP() []byte {
	file_errors_error_proto_rawDescOnce.Do(func() {
		file_errors_error_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_errors_error_proto_rawDesc), len(file_errors_error_proto_rawDesc)))
	})
	return file_errors_error_proto_rawDescData
}

var file_errors_error_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_errors_error_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_errors_error_proto_goTypes = []any{
	(ERR)(0),       // 0: errors.ERR
	(*TError)(nil), // 1: errors.TError
}
var file_errors_error_proto_depIdxs = []int32{
	0, // 0: errors.TError.code:type_name -> errors.ERR
	1, // 1: errors.TError.wrappedError:type_name -> errors.TError
	2, // [2:2] is the sub-list for method output_type
	2, // [2:2] is the sub-list for method input_type
	2, // [2:2] is the sub-list for extension type_name
	2, // [2:2] is the sub-list for extension extendee
	0, // [0:2] is the sub-list for field type_name
}

func init() { file_errors_error_proto_init() }
func file_errors_error_proto_init() {
	if File_errors_error_proto != nil {
		return
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_errors_error_proto_rawDesc), len(file_errors_error_proto_rawDesc)),
			NumEnums:      1,
			NumMessages:   1,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_errors_error_proto_goTypes,
		DependencyIndexes: file_errors_error_proto_depIdxs,
		EnumInfos:         file_errors_error_proto_enumTypes,
		MessageInfos:      file_errors_error_proto_msgTypes,
	}.Build()
	File_errors_error_proto = out.File
	file_errors_error_proto_goTypes = nil
	file_errors_error_proto_depIdxs = nil
}
