From a12f70bf5506ebf86b2a052230a36014e0e25b1d Mon Sep 17 00:00:00 2001 From: miketout Date: Fri, 26 Oct 2018 01:04:07 -0700 Subject: [PATCH] Ensure that only valid staking transactions are synced with wallets --- src/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 0e2549326..11ed27928 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -4558,9 +4558,9 @@ bool CheckBlock(int32_t *futureblockp,int32_t height,CBlockIndex *pindex,const C Tx = tx; if ( myAddtomempool(Tx, &state) == false ) // happens with out of order tx in block on resync { - // take advantage of other checks, but if we were only rejected because it is a staking + // take advantage of other checks, but if we were only rejected because it is a valid staking // transaction, sync with wallets and don't mark as a reject - if (state.GetRejectReason() == "staking") + if (i == (block.vtx.size() - 1) && ASSETCHAINS_LWMAPOS && block.IsVerusPOSBlock() && state.GetRejectReason() == "staking") SyncWithWallets(Tx, &block); else rejects++;