// AddStake adds a Stake payload into a batch.
AddStake adds a Stake payload into a batch.
// AddStake adds a Stake payload into a batch .
func (b *Batch) AddStake(s Stake) error {
	if b.Size == 255 {
		return fmt.Errorf("batch cannot have more than 255 transactions")
	}
	b.Size++
	b.Tags = append(b.Tags, uint8(sys.TagStake))
	payload, err := s.Marshal()
	if err != nil {
		return errors.Wrap(err, "error marshaling stake")
	}
	b.Payloads = append(b.Payloads, payload)
	return nil
}
func ( b * Batch ) AddStake ( s Stake ) error { if b . Size == 255 { return fmt . Errorf ( " " ) } b . Size ++ b . Tags = append ( b . Tags , uint8 ( sys . TagStake ) ) payload , err := s . Marshal ( ) if err != nil { return errors . Wrap ( err , " " ) } b . Payloads = append ( b . Payloads , payload ) return nil }
AddStake adds a Stake payload into a batch.
AddStake adds a Stake payload into a batch .