diff options
author | Jimmy Hu <jimmy.hu@dexon.org> | 2018-10-05 11:06:01 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-05 11:06:01 +0800 |
commit | 9bb7b300f2061a59392934406413d8d06d9fd542 (patch) | |
tree | a457b3604191ea6c83d227c51d9d957af197342c /core/types/block.go | |
parent | efcb301ec31acf7b87312cbec962682148555999 (diff) | |
download | tangerine-consensus-9bb7b300f2061a59392934406413d8d06d9fd542.tar tangerine-consensus-9bb7b300f2061a59392934406413d8d06d9fd542.tar.gz tangerine-consensus-9bb7b300f2061a59392934406413d8d06d9fd542.tar.bz2 tangerine-consensus-9bb7b300f2061a59392934406413d8d06d9fd542.tar.lz tangerine-consensus-9bb7b300f2061a59392934406413d8d06d9fd542.tar.xz tangerine-consensus-9bb7b300f2061a59392934406413d8d06d9fd542.tar.zst tangerine-consensus-9bb7b300f2061a59392934406413d8d06d9fd542.zip |
types: Test block clone (#175)
Diffstat (limited to 'core/types/block.go')
-rw-r--r-- | core/types/block.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/types/block.go b/core/types/block.go index c785969..297f479 100644 --- a/core/types/block.go +++ b/core/types/block.go @@ -95,6 +95,8 @@ func (b *Block) Clone() (bcopy *Block) { bcopy.ConsensusHeight = b.ConsensusHeight bcopy.Witness.Timestamp = b.Witness.Timestamp bcopy.Witness.Height = b.Witness.Height + bcopy.Witness.Data = make([]byte, len(b.Witness.Data)) + copy(bcopy.Witness.Data, b.Witness.Data) bcopy.Timestamp = b.Timestamp bcopy.Acks = make(common.SortedHashes, len(b.Acks)) copy(bcopy.Acks, b.Acks) |