Skip to content

Commit

Permalink
btcutil/txsort: wipe cache before assertion on mutated txn
Browse files Browse the repository at this point in the history
  • Loading branch information
Roasbeef committed Dec 5, 2023
1 parent d045a70 commit 5ba479d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions btcutil/txsort/txsort_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ func TestSort(t *testing.T) {
// Now sort the transaction using the mutable version and ensure
// the resulting hash is the expected value.
txsort.InPlaceSort(&tx)

tx.WipeCache()

if got := tx.TxHash().String(); got != test.sortedHash {
t.Errorf("SortMutate (%s): sorted hash does not match "+
"expected - got %v, want %v", test.name, got,
Expand Down

0 comments on commit 5ba479d

Please sign in to comment.