From 4e3393ccf3d9445c4de15c4da997c8b7555586ff Mon Sep 17 00:00:00 2001 From: Sunny King Date: Wed, 30 May 2012 17:56:34 +0100 Subject: [PATCH] PPCoin: Print coinstake info with printblocktree --- src/wallet.cpp | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/wallet.cpp b/src/wallet.cpp index c245f84..bab18b6 100644 --- a/src/wallet.cpp +++ b/src/wallet.cpp @@ -1341,10 +1341,15 @@ void CWallet::PrintWallet(const CBlock& block) { CRITICAL_BLOCK(cs_wallet) { - if (mapWallet.count(block.vtx[0].GetHash())) + if (block.IsProofOfWork() && mapWallet.count(block.vtx[0].GetHash())) { CWalletTx& wtx = mapWallet[block.vtx[0].GetHash()]; - printf(" mine: %d %d %d", wtx.GetDepthInMainChain(), wtx.GetBlocksToMaturity(), wtx.GetCredit()); + printf(" mine: %d %d %s", wtx.GetDepthInMainChain(), wtx.GetBlocksToMaturity(), FormatMoney(wtx.GetCredit()).c_str()); + } + if (block.IsProofOfStake() && mapWallet.count(block.vtx[1].GetHash())) + { + CWalletTx& wtx = mapWallet[block.vtx[1].GetHash()]; + printf(" stake: %d %d %s", wtx.GetDepthInMainChain(), wtx.GetBlocksToMaturity(), FormatMoney(wtx.GetCredit()).c_str()); } } printf("\n"); -- 1.7.1