parameters: (self, numPool=None, isActuallyNew=True, 
                         doRegister=True, Progress=emptyFunc)
return_statement: return self.lastComputedChainIndex
docstring: Usually, when we fill the address pool, we are generating addresses
        for the first time, and thus there is no chance it's ever seen the
        blockchain.  However, this method is also used for recovery/import 
        of wallets, where the address pool has addresses that probably have
        transactions already in the blockchain.
docstring_summary: Usually, when we fill the address pool, we are generating addresses
        for the first time, and thus there is no chance it's ever seen the
        blockchain.  However, this method is also used for recovery/import 
        of wallets, where the address pool has addresses that probably have
        transactions already in the blockchain.
docstring_tokens: Usually when we fill the address pool we are generating addresses for the first time and thus there is no chance it s ever seen the blockchain . However this method is also used for recovery / import of wallets where the address pool has addresses that probably have transactions already in the blockchain .
function: def fillAddressPool(self, numPool=None, isActuallyNew=True, 
                         doRegister=True, Progress=emptyFunc):
        """
        Usually, when we fill the address pool, we are generating addresses
        for the first time, and thus there is no chance it's ever seen the
        blockchain.  However, this method is also used for recovery/import 
        of wallets, where the address pool has addresses that probably have
        transactions already in the blockchain.  
        """
        if not numPool:
           numPool = self.addrPoolSize
  
        lastComputedIndex = self.lastComputedChainIndex
        gap = self.lastComputedChainIndex - self.highestUsedChainIndex
        numToCreate = max(numPool - gap, 0)
        
        newAddrList = []
        
        for i in range(numToCreate):
           Progress(i+1, numToCreate)
           newAddrList.append(Hash160ToScrAddr(self.computeNextAddress(\
                                   isActuallyNew=isActuallyNew, \
                                   doRegister=False))) 
           
        #add addresses in bulk once they are all computed   
        if doRegister and self.isRegistered():
           #isEnabled will be flagged back to True by the callback once it notifies
           #that the wallet has properly loaded the new scrAddr and scanned it
           
           wltNAddr = {}
           wltNAddr[self.uniqueIDB58] = newAddrList
           TheBDM.bdv().registerAddressBatch(wltNAddr, isActuallyNew)
           self.actionsToTakeAfterScan.append([self.detectHighestUsedIndex, \
                                            [lastComputedIndex, True]])
           
        return self.lastComputedChainIndex
function_tokens: def fillAddressPool ( self , numPool = None , isActuallyNew = True , doRegister = True , Progress = emptyFunc ) : if not numPool : numPool = self . addrPoolSize lastComputedIndex = self . lastComputedChainIndex gap = self . lastComputedChainIndex - self . highestUsedChainIndex numToCreate = max ( numPool - gap , 0 ) newAddrList = [ ] for i in range ( numToCreate ) : Progress ( i + 1 , numToCreate ) newAddrList . append ( Hash160ToScrAddr ( self . computeNextAddress ( isActuallyNew = isActuallyNew , doRegister = False ) ) ) #add addresses in bulk once they are all computed    if doRegister and self . isRegistered ( ) : #isEnabled will be flagged back to True by the callback once it notifies #that the wallet has properly loaded the new scrAddr and scanned it wltNAddr = { } wltNAddr [ self . uniqueIDB58 ] = newAddrList TheBDM . bdv ( ) . registerAddressBatch ( wltNAddr , isActuallyNew ) self . actionsToTakeAfterScan . append ( [ self . detectHighestUsedIndex , [ lastComputedIndex , True ] ] ) return self . lastComputedChainIndex