(weight uint, threshold uint, branch []byte)
| 741 | } |
| 742 | |
| 743 | func (buf *Buffer) WriteSequenceNestedSignaturePart(weight uint, threshold uint, branch []byte) (EncodeType, error) { |
| 744 | if weight > 255 { |
| 745 | return Stateless, fmt.Errorf("weight exceeds 255") |
| 746 | } |
| 747 | |
| 748 | if threshold > 255 { |
| 749 | return Stateless, fmt.Errorf("threshold exceeds 255") |
| 750 | } |
| 751 | |
| 752 | buf.commitUint(FLAG_SEQUENCE_NESTED) |
| 753 | buf.commitUint(weight) |
| 754 | buf.commitUint(threshold) |
| 755 | buf.end([]byte{}, Stateless) |
| 756 | |
| 757 | return buf.WriteSequenceSignatureTree(branch) |
| 758 | } |
| 759 | |
| 760 | func (buf *Buffer) WriteSequenceBranchSignaturePart(branch []byte) (EncodeType, error) { |
| 761 | if len(branch) == 0 { |
no test coverage detected