I haven't seen that loop since I started running bitcoin-qt independent of armory. But I've only open and closed it a few times, so it could just be a coincidence.
It really does only happen like once every 10 loads. And then goes away. Which will make it tough for me to track it down. So it's more "expected" than "coincidence"...
I know you're busy, but I have (hopefully) a quick question -- I'm trying to add an address to a wallet following the add 500k address in extras, but only adding 1 key ...
...
Any ideas?
You just made me realize I should probably remove that example script... that script is actually "special" because someone had wanted to try running Armory with 500k addresses, and I said that it would be ridiculously slow to import them "the right way" (shown below). So I recommended he manually modify the wallet files with the proper wallet format -- you should
not import addresses that way!
Instead, use the built-in function, and leave everything blank except for the privKey argument:
def importExternalAddressData(self, privKey=None, privChk=None, \
pubKey=None, pubChk=None, \
addr20=None, addrChk=None, \
firstTime=UINT32_MAX, firstBlk=UINT32_MAX, \
lastTime=0, lastBlk=0):
I haven't tested the following code, but it would look something like this (note that key data needs to be crammed into a "SecureBinaryData" object before being passed to any of these methods -- but still pretty simple)
# If run from extras dir, need to add parent dir to path
import sys
sys.path.append('..')
from armoryengine import *
# Create the SBD object for the private key which is "aaaaaaaa..."
hardcodedPrivKey = SecureBinaryData(hex_to_binary('aa'*32))
# Read the wallet file (it handles all the backup stuff automatically)
wlt = PyBtcWallet().readWalletFile('/path/to/my.wallet')
# Import the address using the built-in method
wlt.importExternalAddressData(privKey=hardcodedPrivKey)
# Nothing else needs to be done -- the wallet is closed after every operation already
print 'Done!'
# But let's verify it worked:
addr160 = convertKeyDataToAddress(hardcodedPrivKey)
addrStr = hash160_to_addrStr(addr160)
print 'The new address is', addrStr, 'and is in the wallet:', wlt.hasAddr(addr160)
Yeah, it's dead simple when you're using the right calls... sorry for the confusion!
Edit updated the script with formatting and with the hex_to_binary() call which is needed if you are plugging in a hex private key. Also, you may have damaged your previous wallet file trying the original script. You might consider removing it and trying the new script on the original to make sure you're not mixing two different things.