diff options
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/main.cpp b/src/main.cpp index bb317d2..c882b0b 100644 --- a/src/main.cpp +++ b/src/main.cpp | |||
| @@ -898,7 +898,7 @@ bool CTransaction::ConnectInputs(CTxDB& txdb, map<uint256, CTxIndex>& mapTestPoo | |||
| 898 | } | 898 | } |
| 899 | 899 | ||
| 900 | if (prevout.n >= txPrev.vout.size() || prevout.n >= txindex.vSpent.size()) | 900 | if (prevout.n >= txPrev.vout.size() || prevout.n >= txindex.vSpent.size()) |
| 901 | return error("ConnectInputs() : %s prevout.n out of range %d %d %d", GetHash().ToString().substr(0,6).c_str(), prevout.n, txPrev.vout.size(), txindex.vSpent.size()); | 901 | return error("ConnectInputs() : %s prevout.n out of range %d %d %d", GetHash().ToString().substr(0,6).c_str(), prevout.n, (int)txPrev.vout.size(), (int)txindex.vSpent.size()); |
| 902 | 902 | ||
| 903 | // If prev is coinbase, check that it's matured | 903 | // If prev is coinbase, check that it's matured |
| 904 | if (txPrev.IsCoinBase()) | 904 | if (txPrev.IsCoinBase()) |
| @@ -1690,14 +1690,14 @@ void PrintBlockTree() | |||
| 1690 | pindex->nBlockPos, | 1690 | pindex->nBlockPos, |
| 1691 | block.GetHash().ToString().substr(0,14).c_str(), | 1691 | block.GetHash().ToString().substr(0,14).c_str(), |
| 1692 | DateTimeStr(block.nTime).c_str(), | 1692 | DateTimeStr(block.nTime).c_str(), |
| 1693 | block.vtx.size()); | 1693 | (int)block.vtx.size()); |
| 1694 | 1694 | ||
| 1695 | CRITICAL_BLOCK(cs_mapWallet) | 1695 | CRITICAL_BLOCK(cs_mapWallet) |
| 1696 | { | 1696 | { |
| 1697 | if (mapWallet.count(block.vtx[0].GetHash())) | 1697 | if (mapWallet.count(block.vtx[0].GetHash())) |
| 1698 | { | 1698 | { |
| 1699 | CWalletTx& wtx = mapWallet[block.vtx[0].GetHash()]; | 1699 | CWalletTx& wtx = mapWallet[block.vtx[0].GetHash()]; |
| 1700 | printf(" mine: %d %d %d", wtx.GetDepthInMainChain(), wtx.GetBlocksToMaturity(), wtx.GetCredit()); | 1700 | printf(" mine: %d %d %lld", wtx.GetDepthInMainChain(), wtx.GetBlocksToMaturity(), wtx.GetCredit()); |
| 1701 | } | 1701 | } |
| 1702 | } | 1702 | } |
| 1703 | printf("\n"); | 1703 | printf("\n"); |
| @@ -1759,7 +1759,7 @@ bool ProcessMessages(CNode* pfrom) | |||
| 1759 | CDataStream& vRecv = pfrom->vRecv; | 1759 | CDataStream& vRecv = pfrom->vRecv; |
| 1760 | if (vRecv.empty()) | 1760 | if (vRecv.empty()) |
| 1761 | return true; | 1761 | return true; |
| 1762 | LogPrint("net", "ProcessMessages(%d bytes)\n", vRecv.size()); | 1762 | LogPrint("net", "ProcessMessages(%d bytes)\n", (int)vRecv.size()); |
| 1763 | 1763 | ||
| 1764 | // | 1764 | // |
| 1765 | // Message format | 1765 | // Message format |
| @@ -1783,7 +1783,7 @@ bool ProcessMessages(CNode* pfrom) | |||
| 1783 | break; | 1783 | break; |
| 1784 | } | 1784 | } |
| 1785 | if (pstart - vRecv.begin() > 0) | 1785 | if (pstart - vRecv.begin() > 0) |
| 1786 | if (LogAcceptsCategory("net")) printf("\n\nPROCESSMESSAGE SKIPPED %d BYTES\n\n", pstart - vRecv.begin()); | 1786 | if (LogAcceptsCategory("net")) printf("\n\nPROCESSMESSAGE SKIPPED %d BYTES\n\n", (int)(pstart - vRecv.begin())); |
| 1787 | vRecv.erase(vRecv.begin(), pstart); | 1787 | vRecv.erase(vRecv.begin(), pstart); |
| 1788 | 1788 | ||
| 1789 | // Read header | 1789 | // Read header |
| @@ -1836,7 +1836,7 @@ bool ProcessMessages(CNode* pfrom) | |||
| 1836 | bool ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) | 1836 | bool ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) |
| 1837 | { | 1837 | { |
| 1838 | static map<unsigned int, vector<unsigned char> > mapReuseKey; | 1838 | static map<unsigned int, vector<unsigned char> > mapReuseKey; |
| 1839 | if (LogAcceptsCategory("net")) { printf("received: %-12s (%d bytes) ", strCommand.c_str(), vRecv.size()); for (int i = 0; i < min(vRecv.size(), (unsigned int)25); i++) printf("%02x ", vRecv[i] & 0xff); printf("\n"); } | 1839 | if (LogAcceptsCategory("net")) { printf("received: %-12s (%d bytes) ", strCommand.c_str(), (int)vRecv.size()); for (int i = 0; i < min(vRecv.size(), (unsigned int)25); i++) printf("%02x ", vRecv[i] & 0xff); printf("\n"); } |
| 1840 | if (nDropMessagesTest > 0 && GetRand(nDropMessagesTest) == 0) | 1840 | if (nDropMessagesTest > 0 && GetRand(nDropMessagesTest) == 0) |
| 1841 | { | 1841 | { |
| 1842 | if (LogAcceptsCategory("net")) printf("dropmessages DROPPING RECV MESSAGE\n"); | 1842 | if (LogAcceptsCategory("net")) printf("dropmessages DROPPING RECV MESSAGE\n"); |
| @@ -2171,7 +2171,7 @@ bool ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) | |||
| 2171 | 2171 | ||
| 2172 | 2172 | ||
| 2173 | if (!vRecv.empty()) | 2173 | if (!vRecv.empty()) |
| 2174 | if (LogAcceptsCategory("net")) printf("ProcessMessage(%s) : %d extra bytes\n", strCommand.c_str(), vRecv.size()); | 2174 | if (LogAcceptsCategory("net")) printf("ProcessMessage(%s) : %d extra bytes\n", strCommand.c_str(), (int)vRecv.size()); |
| 2175 | 2175 | ||
| 2176 | return true; | 2176 | return true; |
| 2177 | } | 2177 | } |
| @@ -2885,7 +2885,7 @@ bool BitcoinMiner() | |||
| 2885 | } | 2885 | } |
| 2886 | pblock->nBits = nBits; | 2886 | pblock->nBits = nBits; |
| 2887 | pblock->vtx[0].vout[0].nValue = pblock->GetBlockValue(nBestHeight + 1, nFees); | 2887 | pblock->vtx[0].vout[0].nValue = pblock->GetBlockValue(nBestHeight + 1, nFees); |
| 2888 | if (LogAcceptsCategory("net")) printf("\n\nRunning BitcoinMiner with %d transactions in block\n", pblock->vtx.size()); | 2888 | if (LogAcceptsCategory("net")) printf("\n\nRunning BitcoinMiner with %d transactions in block\n", (int)pblock->vtx.size()); |
| 2889 | 2889 | ||
| 2890 | 2890 | ||
| 2891 | // | 2891 | // |