BitcoinArmory icon indicating copy to clipboard operation
BitcoinArmory copied to clipboard

Convert tuple to list in getUsableTxOutList()

Open kalakris opened this issue 11 years ago • 1 comments

I get this error when trying to send a transaction:

(ERROR) Traceback (most recent call last):
  File "/home/kalakris/bitcoin/BitcoinArmory/qtdialogs.py", line 5133, in createTxAndBroadcast
    txdp = self.validateInputsGetTxDP()
  File "/home/kalakris/bitcoin/BitcoinArmory/qtdialogs.py", line 5312, in validateInputsGetTxDP
    utxoSelect = PySelectCoins(utxoList, totalSend, fee)
  File "/home/kalakris/bitcoin/BitcoinArmory/armoryengine.py", line 5388, in PySelectCoins
    utxos = PySortCoins(unspentTxOutInfo, method)
  File "/home/kalakris/bitcoin/BitcoinArmory/armoryengine.py", line 4980, in PySortCoins
    random.shuffle(utxosNoZC)
  File "/usr/lib/python2.7/random.py", line 288, in shuffle
    x[i], x[j] = x[j], x[i]
TypeError: 'tuple' object does not support item assignment

It seems like utxosNoZC should be a list and not a tuple. The attached patch fixes this issue. (May also fix issue #24).

kalakris avatar Mar 09 '13 22:03 kalakris

This looks correct, and I see what it's fixing and why. It should probably be merged.

gwillen avatar Apr 19 '13 01:04 gwillen