From e8f99372159a89fb3128b870de1733a4777a5144 Mon Sep 17 00:00:00 2001 From: Jimmy Hu Date: Tue, 21 Aug 2018 12:40:30 +0800 Subject: core: Notary ack (#69) --- core/types/notary.go | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'core/types') diff --git a/core/types/notary.go b/core/types/notary.go index 01237b4..216466c 100644 --- a/core/types/notary.go +++ b/core/types/notary.go @@ -35,6 +35,16 @@ type NotaryAck struct { Signature crypto.Signature `json:"signature"` } +// Clone returns a deep copy of a NotaryAck. +func (a *NotaryAck) Clone() *NotaryAck { + return &NotaryAck{ + ProposerID: a.ProposerID, + NotaryBlockHash: a.NotaryBlockHash, + Hash: a.Hash, + Signature: a.Signature, + } +} + // Notary represents the consensus information on the compaction chain. type Notary struct { ParentHash common.Hash `json:"parent_hash"` -- cgit v1.2.3