def testInput(self): inp1 = Transaction.Input(b'abcdef', 0) inp2 = Transaction.Input(b'abcdef', 1) inp3 = Transaction.Input(b'abcdefg', 0) inp4 = Transaction.Input(b'abcdef', 1) assert inp1 != inp2 assert hash(inp1) != hash(inp2) assert hash(inp2) != hash(inp3) assert hash(inp2) == hash(inp4)
def main(self): inp1 = Transaction.Input(b'abcdef', 0) utxo = UTXO(inp1.prevTxHash, inp1.outputIndex) self._pool.addUTXO(utxo, out) inp2 = Transaction.Input(b'abcdef', 1) utxo = UTXO(inp2.prevTxHash, inp2.outputIndex) self._pool.addUTXO(utxo, out) inp3 = Transaction.Input(b'abcdefg', 0) utxo = UTXO(inp3.prevTxHash, inp3.outputIndex) self._pool.addUTXO(utxo, out) inp4 = Transaction.Input(b'abcdef', 1) utxo = UTXO(inp4.prevTxHash, inp4.outputIndex) self._pool.addUTXO(utxo, out) inp5 = Transaction.Input(b'fabcde', 0) utxo = UTXO(inp5.prevTxHash, inp5.outputIndex) self._pool.addUTXO(utxo, out)