Skip to content

Commit

Permalink
small fixes for mac builds
Browse files Browse the repository at this point in the history
  • Loading branch information
justinvforvendetta committed Jun 1, 2017
1 parent 50ac713 commit ccce488
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
16 changes: 8 additions & 8 deletions src/wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@ void CWallet::ReacceptWalletTransactions()
// Update fSpent if a tx got spent somewhere else by a copy of wallet.dat
if (txindex.vSpent.size() != wtx.vout.size())
{
printf("ERROR: ReacceptWalletTransactions() : txindex.vSpent.size() %"PRIszu" != wtx.vout.size() %"PRIszu"\n", txindex.vSpent.size(), wtx.vout.size());
printf("ERROR: ReacceptWalletTransactions() : txindex.vSpent.size() %" PRIszu" != wtx.vout.size() %" PRIszu"\n", txindex.vSpent.size(), wtx.vout.size());
continue;
}
for (unsigned int i = 0; i < txindex.vSpent.size(); i++)
Expand Down Expand Up @@ -1708,12 +1708,12 @@ void CWallet::PrintWallet(const CBlock& block)
if (block.IsProofOfWork() && mapWallet.count(block.vtx[0].GetHash()))
{
CWalletTx& wtx = mapWallet[block.vtx[0].GetHash()];
printf(" mine: %d %d %"PRI64d"", wtx.GetDepthInMainChain(), wtx.GetBlocksToMaturity(), wtx.GetCredit());
printf(" mine: %d %d %" PRI64d"", wtx.GetDepthInMainChain(), wtx.GetBlocksToMaturity(), wtx.GetCredit());
}
if (block.IsProofOfStake() && mapWallet.count(block.vtx[1].GetHash()))
{
CWalletTx& wtx = mapWallet[block.vtx[1].GetHash()];
printf(" stake: %d %d %"PRI64d"", wtx.GetDepthInMainChain(), wtx.GetBlocksToMaturity(), wtx.GetCredit());
printf(" stake: %d %d %" PRI64d"", wtx.GetDepthInMainChain(), wtx.GetBlocksToMaturity(), wtx.GetCredit());
}

}
Expand Down Expand Up @@ -1776,7 +1776,7 @@ bool CWallet::NewKeyPool()
walletdb.WritePool(nIndex, CKeyPool(GenerateNewKey()));
setKeyPool.insert(nIndex);
}
printf("CWallet::NewKeyPool wrote %"PRI64d" new keys\n", nKeys);
printf("CWallet::NewKeyPool wrote %" PRI64d" new keys\n", nKeys);
}
return true;
}
Expand All @@ -1801,7 +1801,7 @@ bool CWallet::TopUpKeyPool()
if (!walletdb.WritePool(nEnd, CKeyPool(GenerateNewKey())))
throw runtime_error("TopUpKeyPool() : writing generated key failed");
setKeyPool.insert(nEnd);
printf("keypool added key %"PRI64d", size=%"PRIszu"\n", nEnd, setKeyPool.size());
printf("keypool added key %" PRI64d", size=%" PRIszu"\n", nEnd, setKeyPool.size());
}
}
return true;
Expand Down Expand Up @@ -1831,7 +1831,7 @@ void CWallet::ReserveKeyFromKeyPool(int64& nIndex, CKeyPool& keypool)
throw runtime_error("ReserveKeyFromKeyPool() : unknown key in key pool");
assert(keypool.vchPubKey.IsValid());
if (fDebug && GetBoolArg("-printkeypool"))
printf("keypool reserve %"PRI64d"\n", nIndex);
printf("keypool reserve %" PRI64d"\n", nIndex);
}
}

Expand Down Expand Up @@ -1859,7 +1859,7 @@ void CWallet::KeepKey(int64 nIndex)
walletdb.ErasePool(nIndex);
}
if (fDebug && GetBoolArg("-printkeypool", false))
printf("keypool keep %"PRI64d"\n", nIndex);
printf("keypool keep %" PRI64d"\n", nIndex);
}

void CWallet::ReturnKey(int64 nIndex)
Expand All @@ -1870,7 +1870,7 @@ void CWallet::ReturnKey(int64 nIndex)
setKeyPool.insert(nIndex);
}
if(fDebug && GetBoolArg("-printkeypool", false))
printf("keypool return %"PRI64d"\n", nIndex);
printf("keypool return %" PRI64d"\n", nIndex);
}

bool CWallet::GetKeyFromPool(CPubKey& result, bool fAllowReuse)
Expand Down
6 changes: 3 additions & 3 deletions src/walletdb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ void ThreadFlushWalletDB(void* parg)
bitdb.CheckpointLSN(strFile);

bitdb.mapFileUseCount.erase(mi++);
printf("Flushed wallet.dat %"PRI64d"ms\n", GetTimeMillis() - nStart);
printf("Flushed wallet.dat %" PRI64d"ms\n", GetTimeMillis() - nStart);
}
}
}
Expand Down Expand Up @@ -596,7 +596,7 @@ bool CWalletDB::Recover(CDBEnv& dbenv, std::string filename, bool fOnlyKeys)
// Set -rescan so any missing transactions will be
// found.
int64 now = GetTime();
std::string newFilename = strprintf("wallet.%"PRI64d".bak", now);
std::string newFilename = strprintf("wallet.%" PRI64d".bak", now);

int result = dbenv.dbenv.dbrename(NULL, filename.c_str(), NULL,
newFilename.c_str(), DB_AUTO_COMMIT);
Expand All @@ -615,7 +615,7 @@ bool CWalletDB::Recover(CDBEnv& dbenv, std::string filename, bool fOnlyKeys)
printf("Salvage(aggressive) found no records in %s.\n", newFilename.c_str());
return false;
}
printf("Salvage(aggressive) found %"PRIszu" records\n", salvagedData.size());
printf("Salvage(aggressive) found %" PRIszu" records\n", salvagedData.size());

bool fSuccess = allOK;
Db* pdbCopy = new Db(&dbenv.dbenv, 0);
Expand Down

0 comments on commit ccce488

Please sign in to comment.