kyuupichan / electrumx

Alternative implementation of spesmilo/electrum-server
Other
724 stars 733 forks source link

"TypeError: 'TxInput' object is not callable" during initial sync #275

Closed aesedepece closed 7 years ago

aesedepece commented 7 years ago

During initial blockchain synchronization with local daemon bitcoind 0.15.0, the following TypeError happens after a while, halting synchronization.

ERROR:Controller:Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/electrumx-1.1-py3.6.egg/server/controller.py", line 166, in on_future_done
    future.result()
  File "/usr/local/lib/python3.6/dist-packages/electrumx-1.1-py3.6.egg/server/block_processor.py", line 206, in main_loop
    await task()
  File "/usr/local/lib/python3.6/dist-packages/electrumx-1.1-py3.6.egg/server/block_processor.py", line 243, in check_and_advance_blocks
    for n, raw_block in enumerate(raw_blocks)]
  File "/usr/local/lib/python3.6/dist-packages/electrumx-1.1-py3.6.egg/server/block_processor.py", line 243, in <listcomp>
    for n, raw_block in enumerate(raw_blocks)]
  File "/usr/local/lib/python3.6/dist-packages/electrumx-1.1-py3.6.egg/lib/coins.py", line 276, in block
    txs = cls.DESERIALIZER(raw_block, start=len(header)).read_tx_block()
  File "/usr/local/lib/python3.6/dist-packages/electrumx-1.1-py3.6.egg/lib/tx.py", line 102, in read_tx_block
    txs = [read_tx() for _ in range(self._read_varint())]
  File "/usr/local/lib/python3.6/dist-packages/electrumx-1.1-py3.6.egg/lib/tx.py", line 102, in <listcomp>
    txs = [read_tx() for _ in range(self._read_varint())]
  File "/usr/local/lib/python3.6/dist-packages/electrumx-1.1-py3.6.egg/lib/tx.py", line 208, in read_tx
    return super().read_tx()
  File "/usr/local/lib/python3.6/dist-packages/electrumx-1.1-py3.6.egg/lib/tx.py", line 94, in read_tx
    self._read_inputs(),    # inputs
  File "/usr/local/lib/python3.6/dist-packages/electrumx-1.1-py3.6.egg/lib/tx.py", line 108, in _read_inputs
    return [read_input() for i in range(self._read_varint())]
  File "/usr/local/lib/python3.6/dist-packages/electrumx-1.1-py3.6.egg/lib/tx.py", line 108, in <listcomp>
    return [read_input() for i in range(self._read_varint())]
  File "/usr/local/lib/python3.6/dist-packages/electrumx-1.1-py3.6.egg/lib/tx.py", line 115, in _read_input
    self._read_le_uint32()   # sequence
TypeError: 'TxInput' object is not callable
kyuupichan commented 7 years ago

What are your environment variables

aesedepece commented 7 years ago

My environment is:

DB_ENGINE=rocksdb
DB_DIRECTORY=/data/electrumx

SSL_CERTFILE=/etc/electrumx/server.crt
SSL_KEYFILE=/etc/electrumx/server.key

HOST=127.0.0.1
TCP_PORT=50001
SSL_PORT=50002

PEER_DISCOVERY= 
PEER_ANNOUNCE= 

DAEMON_URL= ...
NET=mainnet
COIN=BitcoinSegwit

TOR_PROXY_HOST=127.0.0.1
TOR_PROXY_PORT=9050