Post
Topic
Board Project Development
Re: [ANNOUNCE] Abe 0.7: Open Source Block Explorer Knockoff
by
Jouke
on 26/10/2013, 18:52:02 UTC
I have never ever programmed in python, but I think I know what is going wrong. I have changed the code in deserialize.py . The import does continue, and the data seems right. But be sure to make a backup of the database!!

You can't lookup the transaction itself in Abe, but at least the rest of the transactions seem to work just fine.


def script_GetOp(bytes):
  i = 0
  while i < len(bytes):
    vch = None
    opcode = ord(bytes)
    i += 1

    if opcode <= opcodes.OP_PUSHDATA4:
      nSize = opcode
      if len(bytes) > 1:
        if opcode == opcodes.OP_PUSHDATA1:
          nSize = ord(bytes)
          i += 1
        elif opcode == opcodes.OP_PUSHDATA2:
          (nSize,) = struct.unpack_from('          i += 2
        elif opcode == opcodes.OP_PUSHDATA4:
          (nSize,) = struct.unpack_from('          i += 4
        if i+nSize > len(bytes):
          vch = "_INVALID_"+bytes[i:]
          i = len(bytes)
        else:
          vch = bytes[i:i+nSize]
          i += nSize
      else:
        vch = "_INVALID_NULL"
        i = len(bytes)

    yield (opcode, vch, i)