/**
* Add a transaction to this atomic group.
*
* An error will be thrown if the composer's status is not BUILDING, or if adding this transaction
* causes the current group to exceed MAX_GROUP_SIZE.
 */
Add a transaction to this atomic group.

An error will be thrown if the composer's status is not BUILDING, or if adding this transaction
causes the current group to exceed MAX_GROUP_SIZE.
/ ** * Add a transaction to this atomic group . * * An error will be thrown if the composer ' s status is not BUILDING or if adding this transaction * causes the current group to exceed MAX_GROUP_SIZE . * /
func (atc *AtomicTransactionComposer) AddTransaction(txnAndSigner TransactionWithSigner) error {
	if atc.status != BUILDING {
		return errors.New("status must be BUILDING in order to add tranactions")
	}
	if atc.Count() == MAX_GROUP_SIZE {
		return fmt.Errorf("reached max group size: %d", MAX_GROUP_SIZE)
	}
	err := atc.validateTransaction(txnAndSigner.Txn)
	if err != nil {
		return err
	}
	txContext := transactionContext{
		txn:    txnAndSigner.Txn,
		signer: txnAndSigner.Signer,
	}
	atc.txContexts = append(atc.txContexts, txContext)
	return nil
}
func ( atc * AtomicTransactionComposer ) AddTransaction ( txnAndSigner TransactionWithSigner ) error { if atc . status != BUILDING { return errors . New ( " " ) } if atc . Count ( ) == MAX_GROUP_SIZE { return fmt . Errorf ( " " , MAX_GROUP_SIZE ) } err := atc . validateTransaction ( txnAndSigner . Txn ) if err != nil { return err } txContext := transactionContext { txn : txnAndSigner . Txn , signer : txnAndSigner . Signer , } atc . txContexts = append ( atc . txContexts , txContext ) return nil }
Add a transaction to this atomic group.
Add a transaction to this atomic group .