Esempio n. 1
0
 def __hash__(self):
     if len(self.instructions):
         #return the hash of the first pushdata instruction
         for instr in self.instructions:
             if is_pushdata(instr.opcode):
                 return hash(self.instruction[0])
         #or the hash of the first instruction if there is no pushdata
         return hash(self.instruction[0])
     return 0
Esempio n. 2
0
def normalize_pushdata(opcodes):
    return [(is_pushdata(op) and OP_PUSHDATA or op) for op in opcodes]
Esempio n. 3
0
 def is_pushdata(self):
     return is_pushdata(self.opcode)
Esempio n. 4
0
 def is_pushdata(self):
     return is_pushdata(self.opcode)
Esempio n. 5
0
def normalize_pushdata(opcodes):
    return [(is_pushdata(op) and OP_PUSHDATA or op) for op in opcodes]