func (bb *BlockBody) Copy() BlockBody {
	newAttestations := make([]Attestation, len(bb.Attestations))
	newProposerSlashings := make([]ProposerSlashing, len(bb.ProposerSlashings))
	newCasperSlashings := make([]CasperSlashing, len(bb.CasperSlashings))
	newDeposits := make([]Deposit, len(bb.Deposits))
	newExits := make([]Exit, len(bb.Exits))
	newVotes := make([]AggregatedVote, len(bb.Votes))

	for i := range bb.Attestations {
		newAttestations[i] = bb.Attestations[i].Copy()
	}

	for i := range bb.ProposerSlashings {
		newProposerSlashings[i] = bb.ProposerSlashings[i].Copy()
	}

	for i := range bb.CasperSlashings {
		newCasperSlashings[i] = bb.CasperSlashings[i].Copy()
	}

	for i := range bb.Deposits {
		newDeposits[i] = bb.Deposits[i].Copy()
	}

	for i := range bb.Exits {
		newExits[i] = bb.Exits[i].Copy()
	}

	for i := range bb.Votes {
		newVotes[i] = bb.Votes[i].Copy()
	}

	return BlockBody{
		Attestations:      newAttestations,
		ProposerSlashings: newProposerSlashings,
		CasperSlashings:   newCasperSlashings,
		Deposits:          newDeposits,
		Exits:             newExits,
		Votes:             newVotes,
	}
}
// Copy returns a copy of the block body.
Copy returns a copy of the block body.
// Copy returns a copy of the block body .
func (bb *BlockBody) Copy() BlockBody {
	newAttestations := make([]Attestation, len(bb.Attestations))
	newProposerSlashings := make([]ProposerSlashing, len(bb.ProposerSlashings))
	newCasperSlashings := make([]CasperSlashing, len(bb.CasperSlashings))
	newDeposits := make([]Deposit, len(bb.Deposits))
	newExits := make([]Exit, len(bb.Exits))
	newVotes := make([]AggregatedVote, len(bb.Votes))
	for i := range bb.Attestations {
		newAttestations[i] = bb.Attestations[i].Copy()
	}
	for i := range bb.ProposerSlashings {
		newProposerSlashings[i] = bb.ProposerSlashings[i].Copy()
	}
	for i := range bb.CasperSlashings {
		newCasperSlashings[i] = bb.CasperSlashings[i].Copy()
	}
	for i := range bb.Deposits {
		newDeposits[i] = bb.Deposits[i].Copy()
	}
	for i := range bb.Exits {
		newExits[i] = bb.Exits[i].Copy()
	}
	for i := range bb.Votes {
		newVotes[i] = bb.Votes[i].Copy()
	}
	return BlockBody{
		Attestations:      newAttestations,
		ProposerSlashings: newProposerSlashings,
		CasperSlashings:   newCasperSlashings,
		Deposits:          newDeposits,
		Exits:             newExits,
		Votes:             newVotes,
	}
}
func ( bb * BlockBody ) Copy ( ) BlockBody { newAttestations := make ( [ ] Attestation , len ( bb . Attestations ) ) newProposerSlashings := make ( [ ] ProposerSlashing , len ( bb . ProposerSlashings ) ) newCasperSlashings := make ( [ ] CasperSlashing , len ( bb . CasperSlashings ) ) newDeposits := make ( [ ] Deposit , len ( bb . Deposits ) ) newExits := make ( [ ] Exit , len ( bb . Exits ) ) newVotes := make ( [ ] AggregatedVote , len ( bb . Votes ) ) for i := range bb . Attestations { newAttestations [ i ] = bb . Attestations [ i ] . Copy ( ) } for i := range bb . ProposerSlashings { newProposerSlashings [ i ] = bb . ProposerSlashings [ i ] . Copy ( ) } for i := range bb . CasperSlashings { newCasperSlashings [ i ] = bb . CasperSlashings [ i ] . Copy ( ) } for i := range bb . Deposits { newDeposits [ i ] = bb . Deposits [ i ] . Copy ( ) } for i := range bb . Exits { newExits [ i ] = bb . Exits [ i ] . Copy ( ) } for i := range bb . Votes { newVotes [ i ] = bb . Votes [ i ] . Copy ( ) } return BlockBody { Attestations : newAttestations , ProposerSlashings : newProposerSlashings , CasperSlashings : newCasperSlashings , Deposits : newDeposits , Exits : newExits , Votes : newVotes , } }
Copy returns a copy of the block body.
Copy returns a copy of the block body .