From 1e9bdcd0a2c083501ea14fb3946655b25fc114fb Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Mon, 28 Mar 2022 19:50:28 +0000 Subject: [PATCH] test: Fix `WalletTests.GetConflictedOrchardNotes` gtest The test was creating a fake shielding transaction, but by using a single null `COutPoint` it was accidentally trying to create a coinbase transaction, which was then rejected by the consistency checks on the Rust side (which require that no inputs be provided for a coinbase transaction, which by definition has no real inputs). --- src/wallet/gtest/test_wallet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wallet/gtest/test_wallet.cpp b/src/wallet/gtest/test_wallet.cpp index d0c3fd997..87c8dee7c 100644 --- a/src/wallet/gtest/test_wallet.cpp +++ b/src/wallet/gtest/test_wallet.cpp @@ -832,7 +832,7 @@ TEST(WalletTests, GetConflictedOrchardNotes) { // Generate a bundle containing output note A. auto builder = TransactionBuilder(consensusParams, 1, orchardAnchor, &keystore); - builder.AddTransparentInput(COutPoint(), scriptPubKey, 50000); + builder.AddTransparentInput(COutPoint(uint256(), 0), scriptPubKey, 50000); builder.AddOrchardOutput(std::nullopt, recipient, 40000, {}); auto maybeTx = builder.Build(); EXPECT_TRUE(maybeTx.IsTx());