@ -1788,8 +1788,8 @@ bool CWalletTx::IsEquivalentTo(const CWalletTx& _tx) const
{
CMutableTransaction tx1 = * this - > tx ;
CMutableTransaction tx2 = * _tx . tx ;
for ( unsigned int i = 0 ; i < tx1 . vin . size ( ) ; i + + ) tx1 . vin [ i ] . scriptSig = CScript ( ) ;
for ( unsigned int i = 0 ; i < tx2 . vin . size ( ) ; i + + ) tx2 . vin [ i ] . scriptSig = CScript ( ) ;
for ( auto & txin : tx1 . vin ) txin . scriptSig = CScript ( ) ;
for ( auto & txin : tx2 . vin ) txin . scriptSig = CScript ( ) ;
return CTransaction ( tx1 ) = = CTransaction ( tx2 ) ;
}
@ -2268,10 +2268,10 @@ bool CWallet::SelectCoinsMinConf(const CAmount& nTargetValue, const int nConfMin
if ( nTotalLower = = nTargetValue )
{
for ( unsigned int i = 0 ; i < vValue . size ( ) ; + + i )
for ( const auto & input : vValue )
{
setCoinsRet . insert ( vValue[ i ] ) ;
nValueRet + = vValue[ i ] . txout . nValue ;
setCoinsRet . insert ( input ) ;
nValueRet + = input . txout . nValue ;
}
return true ;
}
@ -2401,7 +2401,7 @@ bool CWallet::SignTransaction(CMutableTransaction &tx)
// sign the new tx
CTransaction txNewConst ( tx ) ;
int nIn = 0 ;
for ( auto& input : tx . vin ) {
for ( const auto& input : tx . vin ) {
std : : map < uint256 , CWalletTx > : : const_iterator mi = mapWallet . find ( input . prevout . hash ) ;
if ( mi = = mapWallet . end ( ) | | input . prevout . n > = mi - > second . tx - > vout . size ( ) ) {
return false ;
@ -3340,11 +3340,11 @@ std::set< std::set<CTxDestination> > CWallet::GetAddressGroupings()
}
// group lone addrs by themselves
for ( unsigned int i = 0 ; i < pcoin - > tx - > vout . size ( ) ; i + + )
if ( IsMine ( pcoin- > tx- > v out[ i ] ) )
for ( const auto & txout : pcoin - > tx - > vout )
if ( IsMine ( txout) )
{
CTxDestination address ;
if ( ! ExtractDestination ( pcoin- > tx- > v out[ i ] . scriptPubKey , address ) )
if ( ! ExtractDestination ( txout. scriptPubKey , address ) )
continue ;
grouping . insert ( address ) ;
groupings . insert ( grouping ) ;