From 6ff982ccdc37867bade1a295d797ae145847833c Mon Sep 17 00:00:00 2001 From: Wilmer Paulino Date: Mon, 22 Feb 2021 17:38:28 -0800 Subject: [PATCH] wtxmgr: prevent race condition by using local vars --- wtxmgr/tx_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wtxmgr/tx_test.go b/wtxmgr/tx_test.go index 344b905..790112f 100644 --- a/wtxmgr/tx_test.go +++ b/wtxmgr/tx_test.go @@ -2284,11 +2284,11 @@ func TestTxLabel(t *testing.T) { defer teardown() // txid is the transaction hash we will use to write and get labels for. - txid := TstRecvTx.Hash() + txid := &chainhash.Hash{1} // txidNotFound is distinct from txid, and will not have a label written // to disk. - txidNotFound := TstSpendingTx.Hash() + txidNotFound := &chainhash.Hash{2} // getBucket gets the top level bucket, and fails the test if it is // not found.