From 5ba479da995523098cbc83205902efd33a31e579 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Mon, 4 Dec 2023 18:51:02 -0800 Subject: [PATCH] btcutil/txsort: wipe cache before assertion on mutated txn --- btcutil/txsort/txsort_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/btcutil/txsort/txsort_test.go b/btcutil/txsort/txsort_test.go index dd2149294e..d196d6d045 100644 --- a/btcutil/txsort/txsort_test.go +++ b/btcutil/txsort/txsort_test.go @@ -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,