Advertisement
Guest User

hbn 64 bit linux fix

a guest
Oct 17th, 2014
326
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.76 KB | None | 0 0
  1. diff --git a/src/qt/transactiontablemodel.cpp b/src/qt/transactiontablemodel.cpp
  2. index e6dac51..cd921dd 100644
  3. --- a/src/qt/transactiontablemodel.cpp
  4. +++ b/src/qt/transactiontablemodel.cpp
  5. @@ -522,13 +522,13 @@ QVariant TransactionTableModel::data(const QModelIndex &index, int role) const
  6. case Status:
  7. return QString::fromStdString(rec->status.sortKey);
  8. case Date:
  9. - return rec->time;
  10. + return (qlonglong)rec->time;
  11. case Type:
  12. return formatTxType(rec);
  13. case ToAddress:
  14. return formatTxToAddress(rec, true);
  15. case Amount:
  16. - return rec->credit + rec->debit;
  17. + return (qlonglong)rec->credit + rec->debit;
  18. }
  19. break;
  20. case Qt::ToolTipRole:
  21. @@ -561,7 +561,7 @@ QVariant TransactionTableModel::data(const QModelIndex &index, int role) const
  22. case LabelRole:
  23. return walletModel->getAddressTableModel()->labelForAddress(QString::fromStdString(rec->address));
  24. case AmountRole:
  25. - return rec->credit + rec->debit;
  26. + return (qlonglong)rec->credit + rec->debit;
  27. case TxIDRole:
  28. return QString::fromStdString(rec->getTxID());
  29. case ConfirmedRole:
  30. diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp
  31. index 864720b..709461a 100644
  32. --- a/src/qt/walletmodel.cpp
  33. +++ b/src/qt/walletmodel.cpp
  34. @@ -218,7 +218,7 @@ WalletModel::SendCoinsReturn WalletModel::sendCoins(const QList<SendCoinsRecipie
  35. LOCK2(cs_main, wallet->cs_wallet);
  36.  
  37. // Sendmany
  38. - std::vector<std::pair<CScript, qint64> > vecSend;
  39. + std::vector<std::pair<CScript, int64_t> > vecSend;
  40. foreach(const SendCoinsRecipient &rcp, recipients)
  41. {
  42. CScript scriptPubKey;
  43. @@ -228,7 +228,7 @@ WalletModel::SendCoinsReturn WalletModel::sendCoins(const QList<SendCoinsRecipie
  44.  
  45. CWalletTx wtx;
  46. CReserveKey keyChange(wallet);
  47. - qint64 nFeeRequired = 0;
  48. + int64_t nFeeRequired = 0;
  49. bool fCreated = wallet->CreateTransaction(vecSend, wtx, keyChange, nFeeRequired, false, coinControl);
  50.  
  51. if(!fCreated)
  52. @@ -453,7 +453,13 @@ void WalletModel::getStakeWeight(quint64& nMinWeight, quint64& nMaxWeight, quint
  53. if (!lockWallet)
  54. return;
  55.  
  56. - wallet->GetStakeWeight(*wallet, nMinWeight, nMaxWeight, nWeight);
  57. + uint64_t nMinWeight_t = nMinWeight;
  58. + uint64_t nMaxWeight_t = nMaxWeight;
  59. + uint64_t nWeight_t = nWeight;
  60. + wallet->GetStakeWeight(*wallet, nMinWeight_t, nMaxWeight_t, nWeight_t);
  61. + nWeight = nWeight_t;
  62. + nMaxWeight = nMaxWeight_t;
  63. + nMinWeight = nMinWeight_t;
  64. }
  65.  
  66. quint64 WalletModel::getReserveBalance()
  67. @@ -468,7 +474,7 @@ quint64 WalletModel::getTotStakeWeight()
  68. BOOST_FOREACH(const wallet_map::value_type& item, pWalletManager->GetWalletMap())
  69. {
  70. CWallet* pwallet = pWalletManager->GetWallet(item.first.c_str()).get();
  71. - quint64 nMinWeight = 0 ,nMaxWeight = 0, nWeight = 0;
  72. + uint64_t nMinWeight = 0 ,nMaxWeight = 0, nWeight = 0;
  73. pwallet->GetStakeWeight(*pwallet, nMinWeight,nMaxWeight,nWeight);
  74.  
  75. nTotWeight+=nWeight;
  76. @@ -478,17 +484,23 @@ quint64 WalletModel::getTotStakeWeight()
  77.  
  78. void WalletModel::getStakeWeightFromValue(const qint64& nTime, const qint64& nValue, quint64& nWeight)
  79. {
  80. - wallet->GetStakeWeightFromValue(nTime, nValue, nWeight);
  81. + int64_t nTime_t = nTime, nValue_t = nValue;
  82. + uint64_t nWeight_t = nWeight;
  83. + wallet->GetStakeWeightFromValue(nTime_t, nValue_t, nWeight_t);
  84. }
  85.  
  86. void WalletModel::checkWallet(int& nMismatchSpent, qint64& nBalanceInQuestion, int& nOrphansFound)
  87. {
  88. - wallet->FixSpentCoins(nMismatchSpent, nBalanceInQuestion, nOrphansFound, true);
  89. + int64_t nBalanceInQuestion_t = nBalanceInQuestion;
  90. + wallet->FixSpentCoins(nMismatchSpent, nBalanceInQuestion_t, nOrphansFound, true);
  91. + nBalanceInQuestion = nBalanceInQuestion_t;
  92. }
  93.  
  94. void WalletModel::repairWallet(int& nMismatchSpent, qint64& nBalanceInQuestion, int& nOrphansFound)
  95. {
  96. - wallet->FixSpentCoins(nMismatchSpent, nBalanceInQuestion, nOrphansFound);
  97. + int64_t nBalanceInQuestion_t = nBalanceInQuestion;
  98. + wallet->FixSpentCoins(nMismatchSpent, nBalanceInQuestion_t, nOrphansFound);
  99. + nBalanceInQuestion = nBalanceInQuestion_t;
  100. }
  101.  
  102. // Handlers for core signals
  103. diff --git a/src/wallet.cpp b/src/wallet.cpp
  104. index 2f92a53..dcce14c 100644
  105. --- a/src/wallet.cpp
  106. +++ b/src/wallet.cpp
  107. @@ -2148,7 +2148,7 @@ bool CWallet::TopUpKeyPool(unsigned int nSize)
  108. if (nSize > 0)
  109. nTargetSize = nSize;
  110. else
  111. - nTargetSize = max(GetArg("-keypool", 100), 0LL);
  112. + nTargetSize = max(GetArg("-keypool", 100), 0L);
  113.  
  114. while (setKeyPool.size() < (nTargetSize + 1))
  115. {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement