func (tp *TransactionPackage) Copy() TransactionPackage {
	newTp := *tp

	newTp.Updates = make([]UpdateWitness, len(tp.Updates))
	newTp.Verifications = make([]VerificationWitness, len(tp.Verifications))
	newTp.Transactions = make([]ShardTransaction, len(tp.Transactions))

	for i := range newTp.Updates {
		newTp.Updates[i] = tp.Updates[i].Copy()
	}

	for i := range newTp.Verifications {
		newTp.Verifications[i] = tp.Verifications[i].Copy()
	}

	for i := range newTp.Transactions {
		newTp.Transactions[i] = tp.Transactions[i].Copy()
	}

	return newTp
}
// Copy copies the transaction package.
Copy copies the transaction package.
// Copy copies the transaction package .
func (tp *TransactionPackage) Copy() TransactionPackage {
	newTp := *tp
	newTp.Updates = make([]UpdateWitness, len(tp.Updates))
	newTp.Verifications = make([]VerificationWitness, len(tp.Verifications))
	newTp.Transactions = make([]ShardTransaction, len(tp.Transactions))
	for i := range newTp.Updates {
		newTp.Updates[i] = tp.Updates[i].Copy()
	}
	for i := range newTp.Verifications {
		newTp.Verifications[i] = tp.Verifications[i].Copy()
	}
	for i := range newTp.Transactions {
		newTp.Transactions[i] = tp.Transactions[i].Copy()
	}
	return newTp
}
func ( tp * TransactionPackage ) Copy ( ) TransactionPackage { newTp := * tp newTp . Updates = make ( [ ] UpdateWitness , len ( tp . Updates ) ) newTp . Verifications = make ( [ ] VerificationWitness , len ( tp . Verifications ) ) newTp . Transactions = make ( [ ] ShardTransaction , len ( tp . Transactions ) ) for i := range newTp . Updates { newTp . Updates [ i ] = tp . Updates [ i ] . Copy ( ) } for i := range newTp . Verifications { newTp . Verifications [ i ] = tp . Verifications [ i ] . Copy ( ) } for i := range newTp . Transactions { newTp . Transactions [ i ] = tp . Transactions [ i ] . Copy ( ) } return newTp }
Copy copies the transaction package.
Copy copies the transaction package .