From ac2b240436572bbbd7e6fbeb07f2f20837acc42b Mon Sep 17 00:00:00 2001 From: miketout Date: Sat, 13 Oct 2018 01:24:36 -0700 Subject: [PATCH] Add value to cheat catcher through SendChangeTo --- src/miner.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/miner.cpp b/src/miner.cpp index afb72e579..1f07c8365 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -288,7 +288,9 @@ CBlockTemplate* CreateNewBlock(const CScript& _scriptPubKeyIn, int32_t gpucount, if (pwalletMain->GetHDSeed(seed)) { ovk = ovkForShieldingFromTaddr(seed); - tb.AddSaplingOutput(ovk, cheatCatcher.value(), cb.vout[0].nValue); + // send everything to Sapling address + tb.SendChangeTo(cheatCatcher.value(), ovk); + tb.AddOpRet(mtx.vout[mtx.vout.size() - 1].scriptPubKey); cheatSpend = tb.Build();