Deserialize message payload
(source *common.ZeroCopySource)
| 46 | |
| 47 | //Deserialize message payload |
| 48 | func (this *Block) Deserialization(source *common.ZeroCopySource) error { |
| 49 | this.Blk = new(types.Block) |
| 50 | err := this.Blk.Deserialization(source) |
| 51 | if err != nil { |
| 52 | return fmt.Errorf("read Blk error. err:%v", err) |
| 53 | } |
| 54 | |
| 55 | eof := false |
| 56 | this.MerkleRoot, eof = source.NextHash() |
| 57 | if eof { |
| 58 | // to accept old node's block |
| 59 | this.MerkleRoot = common.UINT256_EMPTY |
| 60 | } |
| 61 | |
| 62 | return nil |
| 63 | } |
nothing calls this directly
no test coverage detected