github.com/arieschain/arieschain@v0.0.0-20191023063405-37c074544356/consensus/dbft/core/errors.go (about) 1 package core 2 3 import "errors" 4 5 var ( 6 // errInconsistentSubject is returned when received subject is different from 7 // current subject. 8 errInconsistentSubject = errors.New("inconsistent subjects") 9 // errNotFromProposer is returned when received message is supposed to be from 10 // proposer. 11 errNotFromProposer = errors.New("message does not come from proposer") 12 // errIgnored is returned when a message was ignored. 13 errIgnored = errors.New("message is ignored") 14 // errFutureMessage is returned when current view is earlier than the 15 // view of the received message. 16 errFutureMessage = errors.New("future message") 17 // errOldMessage is returned when the received message's view is earlier 18 // than current view. 19 errOldMessage = errors.New("old message") 20 // errInvalidMessage is returned when the message is malformed. 21 errInvalidMessage = errors.New("invalid message") 22 // errFailedDecodePreprepare is returned when the PRE-PREPARE message is malformed. 23 errFailedDecodePreprepare = errors.New("failed to decode PRE-PREPARE") 24 // errFailedDecodePrepare is returned when the PREPARE message is malformed. 25 errFailedDecodePrepare = errors.New("failed to decode PREPARE") 26 // errFailedDecodeCommit is returned when the COMMIT message is malformed. 27 errFailedDecodeCommit = errors.New("failed to decode COMMIT") 28 // errFailedDecodeMessageSet is returned when the message set is malformed. 29 errFailedDecodeMessageSet = errors.New("failed to decode message set") 30 )