Basic constructor macro for certificate structures.
(make-certificate [:proposal <proposal>] [:endorsers <endorsers>])
This is the usual way to construct certificate structures. It simply conses together a structure with the specified fields.
This macro generates a new certificate structure from scratch. See also change-certificate, which can "change" an existing structure, instead.
This is an ordinary
Macro:
(defmacro make-certificate (&rest args) (std::make-aggregate 'certificate args '((:proposal) (:endorsers)) 'make-certificate nil))
Function:
(defun certificate (proposal endorsers) (declare (xargs :guard (and (proposalp proposal) (address-setp endorsers)))) (declare (xargs :guard t)) (let ((__function__ 'certificate)) (declare (ignorable __function__)) (b* ((proposal (mbe :logic (proposal-fix proposal) :exec proposal)) (endorsers (mbe :logic (address-set-fix endorsers) :exec endorsers))) (list (cons 'proposal proposal) (cons 'endorsers endorsers)))))