// Serialization encode node and write to an io.Writer
// 1. write encode header
// 2. write all not nil child hash value in fix length(32bytes) in index order
// 3. write value hash in fix length(32bytes)
Serialization encode node and write to an io.Writer
1. write encode header
2. write all not nil child hash value in fix length(32bytes) in index order
3. write value hash in fix length(32bytes)
// Serialization encode node and write to an io . Writer // 1 . write encode header // 2 . write all not nil child hash value in fix length ( 32bytes ) in index order // 3 . write value hash in fix length ( 32bytes )
func (n *node) Serialization(w io.Writer) error {
	header := newNodeHeader(n)
	if err := header.Serialization(w); err != nil {
		return err
	}
	if _, err := n.serialChildAndValue(w); err != nil {
		return err
	}
	return nil
}
func ( n * node ) Serialization ( w io . Writer ) error { header := newNodeHeader ( n ) if err := header . Serialization ( w ) ; err != nil { return err } if _ , err := n . serialChildAndValue ( w ) ; err != nil { return err } return nil }
Serialization encode node and write to an io.Writer
1. write encode header
2. write all not nil child hash value in fix length(32bytes) in index order
3. write value hash in fix length(32bytes)
Serialization encode node and write to an io . Writer 1 . write encode header 2 . write all not nil child hash value in fix length ( 32bytes ) in index order 3 . write value hash in fix length ( 32bytes )