| 35 | } |
| 36 | |
| 37 | func (this *BookkeeperState) Serialization(sink *common.ZeroCopySink) { |
| 38 | this.StateBase.Serialization(sink) |
| 39 | sink.WriteUint32(uint32(len(this.CurrBookkeeper))) |
| 40 | for _, v := range this.CurrBookkeeper { |
| 41 | buf := keypair.SerializePublicKey(v) |
| 42 | sink.WriteVarBytes(buf) |
| 43 | } |
| 44 | sink.WriteUint32(uint32(len(this.NextBookkeeper))) |
| 45 | for _, v := range this.NextBookkeeper { |
| 46 | buf := keypair.SerializePublicKey(v) |
| 47 | sink.WriteVarBytes(buf) |
| 48 | } |
| 49 | } |
| 50 | |
| 51 | func (this *BookkeeperState) Deserialization(source *common.ZeroCopySource) error { |
| 52 | err := this.StateBase.Deserialization(source) |