From 56d4ef8333a5c9db04aee636ec383b85089902ee Mon Sep 17 00:00:00 2001 From: Sean Bowe Date: Wed, 17 Jun 2020 17:09:11 -0600 Subject: [PATCH] Make transaction builder take the next block height into account for use of v2 note plaintexts. --- src/transaction_builder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/transaction_builder.cpp b/src/transaction_builder.cpp index 7390932af..52286d00c 100644 --- a/src/transaction_builder.cpp +++ b/src/transaction_builder.cpp @@ -163,7 +163,7 @@ void TransactionBuilder::AddSaplingOutput( } unsigned char leadByte = 0x01; - if (Params().GetConsensus().NetworkUpgradeActive(nHeight, Consensus::UPGRADE_CANOPY)) { + if (Params().GetConsensus().NetworkUpgradeActive(nHeight + 1, Consensus::UPGRADE_CANOPY)) { leadByte = 0x02; } auto note = libzcash::SaplingNote(to, value, leadByte);