From: MASM fan Date: Tue, 13 Jan 2015 19:01:21 +0000 (-0800) Subject: Small refactoring of coinstake & coinbase transactions handling X-Git-Tag: nvc-v0.5.1~5 X-Git-Url: https://git.novaco.in/?p=novacoin.git;a=commitdiff_plain;h=c8a7f72c867da909f4a4dd1d1e1c028ba8547590 Small refactoring of coinstake & coinbase transactions handling --- 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"); }