コード例 #1
0
            /// <summary>
            ///     Builds a transaction. It will increment sequence number of the source account.
            /// </summary>
            /// <returns></returns>
            public Transaction Build()
            {
                var operations = _operations.ToArray();

                var transaction = new Transaction(_sourceAccount.KeyPair, operations.Length * BaseFee, _sourceAccount.GetIncrementedSequenceNumber(), operations, _memo, _timeBounds);
                // Increment sequence number when there were no exceptions when creating a transaction
                _sourceAccount.IncrementSequenceNumber();
                return transaction;
            }
コード例 #2
0
        /// <summary>
        ///     Builds a transaction. It will increment sequence number of the source account.
        /// </summary>
        /// <returns></returns>
        public Transaction Build()
        {
            var operations = _operations.ToArray();

            //var totalFee = operations.Length * _fee;
            var  opsCount    = Convert.ToUInt32(operations.Length);
            uint totalFee    = checked (opsCount * _fee);
            var  transaction = new Transaction(_sourceAccount.MuxedAccount, totalFee,
                                               _sourceAccount.IncrementedSequenceNumber, operations, _memo, _timeBounds);

            // Increment sequence number when there were no exceptions when creating a transaction
            _sourceAccount.IncrementSequenceNumber();
            return(transaction);
        }
コード例 #3
0
            /// <summary>
            ///     Builds a transaction. It will increment sequence number of the source account.
            /// </summary>
            /// <returns></returns>
            public Transaction Build()
            {
                var operations = _operations.ToArray();

                var totalFee = operations.Length * _fee;

                if (totalFee > UInt32.MaxValue)
                {
                    throw new InvalidOperationException("Transaction fee overflow");
                }

                var transaction = new Transaction(_sourceAccount.KeyPair, (uint)totalFee, _sourceAccount.IncrementedSequenceNumber, operations, _memo, _timeBounds);

                // Increment sequence number when there were no exceptions when creating a transaction
                _sourceAccount.IncrementSequenceNumber();
                return(transaction);
            }