From c8a7f72c867da909f4a4dd1d1e1c028ba8547590 Mon Sep 17 00:00:00 2001 From: MASM fan Date: Tue, 13 Jan 2015 11:01:21 -0800 Subject: [PATCH] Small refactoring of coinstake & coinbase transactions handling --- src/wallet.cpp | 15 +++++++-------- 1 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/wallet.cpp b/src/wallet.cpp index 9972627..3906f27 100644 --- a/src/wallet.cpp +++ b/src/wallet.cpp @@ -2209,17 +2209,16 @@ void CWallet::PrintWallet(const CBlock& block) { { LOCK(cs_wallet); - if (block.IsProofOfWork() && mapWallet.count(block.vtx[0].GetHash())) - { - CWalletTx& wtx = mapWallet[block.vtx[0].GetHash()]; - printf(" mine: %d %d %" PRId64 "", wtx.GetDepthInMainChain(), wtx.GetBlocksToMaturity(), wtx.GetCredit(MINE_ALL)); - } if (block.IsProofOfStake() && mapWallet.count(block.vtx[1].GetHash())) { CWalletTx& wtx = mapWallet[block.vtx[1].GetHash()]; - printf(" stake: %d %d %" PRId64 "", wtx.GetDepthInMainChain(), wtx.GetBlocksToMaturity(), wtx.GetCredit(MINE_ALL)); - } - + printf(" PoS: %d %d %" PRId64 "", wtx.GetDepthInMainChain(), wtx.GetBlocksToMaturity(), wtx.GetCredit(MINE_ALL)); + } + else if (mapWallet.count(block.vtx[0].GetHash())) + { + CWalletTx& wtx = mapWallet[block.vtx[0].GetHash()]; + printf(" PoW: %d %d %" PRId64 "", wtx.GetDepthInMainChain(), wtx.GetBlocksToMaturity(), wtx.GetCredit(MINE_ALL)); + } } printf("\n"); } -- 1.7.1