func (h *Hasher) processSection(i int, final bool) {
	secsize := 2 * h.segmentSize
	offset := i * secsize
	level := 1
	// select the leaf node for the section
	n := h.bmt.leaves[i]
	isLeft := n.isLeft
	hasher := n.hasher
	n = n.parent
	// hash the section
	section, err := doHash(hasher, h.bmt.buffer[offset:offset+secsize])
	if err != nil {
		select {
		case h.errc <- err:
		default:
		}
		return
	}
	// write hash into parent node
	if final {
		// for the last segment use writeFinalNode
		h.writeFinalNode(level, n, isLeft, section)
	} else {
		h.writeNode(n, isLeft, section)
	}
}
// processSection writes the hash of i-th section into level 1 node of the BMT tree.
processSection writes the hash of i-th section into level 1 node of the BMT tree.
// processSection writes the hash of i - th section into level 1 node of the BMT tree .
func (h *Hasher) processSection(i int, final bool) {
	secsize := 2 * h.segmentSize
	offset := i * secsize
	level := 1
	n := h.bmt.leaves[i]
	isLeft := n.isLeft
	hasher := n.hasher
	n = n.parent
	section, err := doHash(hasher, h.bmt.buffer[offset:offset+secsize])
	if err != nil {
		select {
		case h.errc <- err:
		default:
		}
		return
	}
	if final {
		h.writeFinalNode(level, n, isLeft, section)
	} else {
		h.writeNode(n, isLeft, section)
	}
}
func ( h * Hasher ) processSection ( i int , final bool ) { secsize := 2 * h . segmentSize offset := i * secsize level := 1 n := h . bmt . leaves [ i ] isLeft := n . isLeft hasher := n . hasher n = n . parent section , err := doHash ( hasher , h . bmt . buffer [ offset : offset + secsize ] ) if err != nil { select { case h . errc <- err : default : } return } if final { h . writeFinalNode ( level , n , isLeft , section ) } else { h . writeNode ( n , isLeft , section ) } }
processSection writes the hash of i-th section into level 1 node of the BMT tree.
processSection writes the hash of i - th section into level 1 node of the BMT tree .
// select the leaf node for the section // hash the section // write hash into parent node // for the last segment use writeFinalNode