Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

txnbuild: multiple calls to Transaction.build() increments operations list #1448

Closed
poliha opened this issue Jun 24, 2019 · 0 comments
Closed
Assignees
Labels
txnbuild 2nd-generation transaction build library for Go SDK

Comments

@poliha
Copy link
Contributor

poliha commented Jun 24, 2019

Lets say you have the following transaction

	tx := Transaction{
		SourceAccount: &sourceAccount,
		Operations:    []Operation{&createAccount},
		Timebounds:    NewInfiniteTimeout(),
		Network:       network.TestNetworkPassphrase,
	}

	err := tx.Build()
	err = tx.Build()

After calling tx.Build() twice, the transaction will have 2 operations instead of one. The intended behaviour is for the transaction to have just one operation.
Also, multiple calls to build will increment the sequence number multiple times, which is not what is probably desired.

@poliha poliha added the txnbuild 2nd-generation transaction build library for Go SDK label Jun 24, 2019
@poliha poliha added this to the horizonclient 1.4.0 milestone Jul 31, 2019
@poliha poliha self-assigned this Aug 6, 2019
@poliha poliha closed this as completed Aug 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
txnbuild 2nd-generation transaction build library for Go SDK
Projects
None yet
Development

No branches or pull requests

1 participant