Skip to content

Fix multiproof test#419

Merged
ChrisSchinnerl merged 1 commit into
masterfrom
nate/fix-multiproof-test
Jul 8, 2026
Merged

Fix multiproof test#419
ChrisSchinnerl merged 1 commit into
masterfrom
nate/fix-multiproof-test

Conversation

@n8mgr

@n8mgr n8mgr commented Jul 7, 2026

Copy link
Copy Markdown
Member

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a failing multiproof roundtrip test by aligning the expected empty-slice representation with the decoder’s behavior, and adjusts slice decoding to overwrite (rather than append to) the destination slice.

Changes:

  • Update TestMultiproofEncoding to normalize Transactions to nil when the transaction set is empty, matching decode results.
  • Change DecodeSlice / DecodeSliceFn to build decoded elements into a new slice and assign it back, preventing accidental append-to-existing behavior.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
types/multiproof_test.go Normalizes empty transaction slices to nil for stable roundtrip equality.
types/encoding.go Updates slice decoding to replace the destination slice instead of appending to it.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread types/encoding.go
Comment thread types/encoding.go
chris124567
chris124567 approved these changes Jul 7, 2026
@ChrisSchinnerl ChrisSchinnerl merged commit 758d603 into master Jul 8, 2026
14 of 15 checks passed
@ChrisSchinnerl ChrisSchinnerl deleted the nate/fix-multiproof-test branch July 8, 2026 07:26
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Sia Jul 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants