/// <summary> /// Initializes an instance of the object. /// </summary> public ConsensusRuleDescriptor(ConsensusRule rule) { this.Rule = rule; this.Attributes = Attribute.GetCustomAttributes(rule.GetType()).OfType <RuleAttribute>().ToList(); this.validationRuleAttribute = this.Attributes.OfType <ValidationRuleAttribute>().FirstOrDefault(); }
public void SetErrorHandler(ConsensusRule errorHandler) { // TODO: set a rule that will be invoked when a validation of a block failed. // This will allow the creator of the blockchain to provide // an error handler rule that is unique to the current blockchain. // future sidechains may have additional handling of errors that // extend or replace the default current error handling code. }