@@ -390,11 +390,11 @@ bool CWallet::ChangeWalletPassphrase(const SecureString& strOldWalletPassphrase,
390
390
{
391
391
int64_t nStartTime = GetTimeMillis ();
392
392
crypter.SetKeyFromPassphrase (strNewWalletPassphrase, pMasterKey.second .vchSalt , pMasterKey.second .nDeriveIterations , pMasterKey.second .nDerivationMethod );
393
- pMasterKey.second .nDeriveIterations = pMasterKey.second .nDeriveIterations * (100 / ((double )(GetTimeMillis () - nStartTime)));
393
+ pMasterKey.second .nDeriveIterations = static_cast < unsigned int >( pMasterKey.second .nDeriveIterations * (100 / ((double )(GetTimeMillis () - nStartTime) )));
394
394
395
395
nStartTime = GetTimeMillis ();
396
396
crypter.SetKeyFromPassphrase (strNewWalletPassphrase, pMasterKey.second .vchSalt , pMasterKey.second .nDeriveIterations , pMasterKey.second .nDerivationMethod );
397
- pMasterKey.second .nDeriveIterations = (pMasterKey.second .nDeriveIterations + pMasterKey.second .nDeriveIterations * 100 / ((double )(GetTimeMillis () - nStartTime))) / 2 ;
397
+ pMasterKey.second .nDeriveIterations = (pMasterKey.second .nDeriveIterations + static_cast < unsigned int >( pMasterKey.second .nDeriveIterations * 100 / ((double )(GetTimeMillis () - nStartTime) ))) / 2 ;
398
398
399
399
if (pMasterKey.second .nDeriveIterations < 25000 )
400
400
pMasterKey.second .nDeriveIterations = 25000 ;
@@ -595,11 +595,11 @@ bool CWallet::EncryptWallet(const SecureString& strWalletPassphrase)
595
595
CCrypter crypter;
596
596
int64_t nStartTime = GetTimeMillis ();
597
597
crypter.SetKeyFromPassphrase (strWalletPassphrase, kMasterKey .vchSalt , 25000 , kMasterKey .nDerivationMethod );
598
- kMasterKey .nDeriveIterations = 2500000 / ((double )(GetTimeMillis () - nStartTime));
598
+ kMasterKey .nDeriveIterations = static_cast < unsigned int >( 2500000 / ((double )(GetTimeMillis () - nStartTime) ));
599
599
600
600
nStartTime = GetTimeMillis ();
601
601
crypter.SetKeyFromPassphrase (strWalletPassphrase, kMasterKey .vchSalt , kMasterKey .nDeriveIterations , kMasterKey .nDerivationMethod );
602
- kMasterKey .nDeriveIterations = (kMasterKey .nDeriveIterations + kMasterKey .nDeriveIterations * 100 / ((double )(GetTimeMillis () - nStartTime))) / 2 ;
602
+ kMasterKey .nDeriveIterations = (kMasterKey .nDeriveIterations + static_cast < unsigned int >( kMasterKey .nDeriveIterations * 100 / ((double )(GetTimeMillis () - nStartTime) ))) / 2 ;
603
603
604
604
if (kMasterKey .nDeriveIterations < 25000 )
605
605
kMasterKey .nDeriveIterations = 25000 ;
0 commit comments