OSDN Git Service

e4bb2ac7c600e6e618409a98db4e4363b2e6bd02
[bytom/vapor.git] / protocol / bc / types / block_witness.go
1 package types
2
3 import (
4         "io"
5
6         "github.com/vapor/encoding/blockchain"
7 )
8
9 type BlockWitness struct {
10         // Witness is a vector of arguments  for validating this block.
11         Witness [][]byte
12 }
13
14 func (bw *BlockWitness) writeTo(w io.Writer) error {
15         _, err := blockchain.WriteVarstrList(w, bw.Witness)
16         return err
17 }
18
19 func (bw *BlockWitness) readFrom(r *blockchain.Reader) (err error) {
20         bw.Witness, err = blockchain.ReadVarstrList(r)
21         return err
22 }