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