From 14c0be6f27bcce3caaafde89d6e145fb54692cd6 Mon Sep 17 00:00:00 2001 From: Daira Hopwood Date: Fri, 10 May 2019 11:41:44 +0100 Subject: [PATCH] Change expiry delta for migration transactions to 450 blocks. Signed-off-by: Daira Hopwood --- src/wallet/asyncrpcoperation_saplingmigration.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/wallet/asyncrpcoperation_saplingmigration.cpp b/src/wallet/asyncrpcoperation_saplingmigration.cpp index 5f34eaeee..db478f27c 100644 --- a/src/wallet/asyncrpcoperation_saplingmigration.cpp +++ b/src/wallet/asyncrpcoperation_saplingmigration.cpp @@ -13,6 +13,7 @@ #include "wallet.h" const CAmount FEE = 10000; +const int MIGRATION_EXPIRY_DELTA = 450; AsyncRPCOperation_saplingmigration::AsyncRPCOperation_saplingmigration(int targetHeight) : targetHeight_(targetHeight) {} @@ -98,7 +99,7 @@ bool AsyncRPCOperation_saplingmigration::main_impl() { CCoinsViewCache coinsView(pcoinsTip); do { CAmount amountToSend = chooseAmount(availableFunds); - auto builder = TransactionBuilder(consensusParams, targetHeight_, expiryDelta, pwalletMain, pzcashParams, + auto builder = TransactionBuilder(consensusParams, targetHeight_, MIGRATION_EXPIRY_DELTA, pwalletMain, pzcashParams, &coinsView, &cs_main); std::vector fromNotes; CAmount fromNoteAmount = 0; @@ -183,7 +184,7 @@ libzcash::SaplingPaymentAddress AsyncRPCOperation_saplingmigration::getMigration libzcash::SaplingExtendedSpendingKey xsk = m_32h_cth.Derive(0 | ZIP32_HARDENED_KEY_LIMIT); libzcash::SaplingPaymentAddress toAddress = xsk.DefaultAddress(); - + // Refactor: this is similar logic as in the visitor HaveSpendingKeyForPaymentAddress and is used elsewhere libzcash::SaplingIncomingViewingKey ivk; libzcash::SaplingFullViewingKey fvk;