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