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

Only initialize Txs once #2538

Merged
merged 6 commits into from
Dec 22, 2023
Merged

Only initialize Txs once #2538

merged 6 commits into from
Dec 22, 2023

Conversation

joshua-kim
Copy link
Contributor

@joshua-kim joshua-kim commented Dec 22, 2023

Why this should be merged

Currently transactions can be initialized multiple times throughout their lifecycle which can cause data races.

Related: #2521

How this works

We only now initialize a tx upon creation or when parsing a block.

How this was tested

Unit tests

Signed-off-by: Joshua Kim <20001595+joshua-kim@users.noreply.github.com>
Signed-off-by: Joshua Kim <20001595+joshua-kim@users.noreply.github.com>
@joshua-kim joshua-kim marked this pull request as ready for review December 22, 2023 17:44
Signed-off-by: Joshua Kim <20001595+joshua-kim@users.noreply.github.com>
vms/platformvm/block/serialization_test.go Outdated Show resolved Hide resolved
vms/platformvm/txs/tx.go Outdated Show resolved Hide resolved
Signed-off-by: Joshua Kim <20001595+joshua-kim@users.noreply.github.com>
Signed-off-by: Joshua Kim <20001595+joshua-kim@users.noreply.github.com>
@StephenButtolph StephenButtolph added this to the v1.10.18 milestone Dec 22, 2023
@StephenButtolph StephenButtolph added the cleanup Code quality improvement label Dec 22, 2023
@StephenButtolph StephenButtolph added this pull request to the merge queue Dec 22, 2023
Merged via the queue into dev with commit f0c150d Dec 22, 2023
17 checks passed
@StephenButtolph StephenButtolph deleted the initialize-txs-once branch December 22, 2023 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup Code quality improvement
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

4 participants