From 8af1971bf3c03076196bd22c6c52b6b9c8d919ef Mon Sep 17 00:00:00 2001 From: miketout Date: Wed, 9 May 2018 03:32:28 -0700 Subject: [PATCH] Only zero sequence for timelocked coinbases to enable shielding all types --- src/wallet/asyncrpcoperation_shieldcoinbase.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/wallet/asyncrpcoperation_shieldcoinbase.cpp b/src/wallet/asyncrpcoperation_shieldcoinbase.cpp index d237bd57c..e58e10f2b 100644 --- a/src/wallet/asyncrpcoperation_shieldcoinbase.cpp +++ b/src/wallet/asyncrpcoperation_shieldcoinbase.cpp @@ -34,6 +34,7 @@ #include "paymentdisclosuredb.h" using namespace libzcash; +extern int64_t ASSETCHAINS_TIMELOCKGTE; static int find_output(UniValue obj, int n) { UniValue outputMapValue = find_value(obj, "outputmap"); @@ -211,7 +212,8 @@ bool AsyncRPCOperation_shieldcoinbase::main_impl() { CMutableTransaction rawTx(tx_); for (ShieldCoinbaseUTXO & t : inputs_) { CTxIn in(COutPoint(t.txid, t.vout)); - in.nSequence = 0; + if (t.amount >= ASSETCHAINS_TIMELOCKGTE) + in.nSequence = 0; rawTx.vin.push_back(in); } tx_ = CTransaction(rawTx);