@Override public Sha256Hash getParentTransactionHash() { return output.getHash(); } }
@Override public Sha256Hash getParentTransactionHash() { return output.getHash(); } }
@Override public Sha256Hash getParentTransactionHash() { return output.getHash(); } }
@Override public Sha256Hash getParentTransactionHash() { return output.getHash(); } }
StoredTransactionOutPoint(UTXO out) { this.hash = out.getHash(); this.index = out.getIndex(); }
@Override public int hashCode() { return Objects.hashCode(getIndex(), getHash()); }
StoredTransactionOutPoint(UTXO out) { this.hash = out.getHash(); this.index = out.getIndex(); }
StoredTransactionOutPoint(UTXO out) { this.hash = out.getHash(); this.index = out.getIndex(); }
@Override public int hashCode() { return Objects.hashCode(getIndex(), getHash()); }
StoredTransactionOutPoint(UTXO out) { this.hash = out.getHash(); this.index = out.getIndex(); }
@Override public int hashCode() { return Objects.hashCode(getIndex(), getHash()); }
@Override public int hashCode() { return Objects.hashCode(getIndex(), getHash()); }
@Override public void removeUnspentTransactionOutput(UTXO out) throws BlockStoreException { maybeConnect(); // TODO: This should only need one query (maybe a stored procedure) if (getTransactionOutput(out.getHash(), out.getIndex()) == null) throw new BlockStoreException("Tried to remove a UTXO from DatabaseFullPrunedBlockStore that it didn't have!"); try { PreparedStatement s = conn.get() .prepareStatement(getDeleteOpenoutputsSQL()); s.setBytes(1, out.getHash().getBytes()); // index is actually an unsigned int s.setInt(2, (int)out.getIndex()); s.executeUpdate(); s.close(); } catch (SQLException e) { throw new BlockStoreException(e); } }
@Override public void removeUnspentTransactionOutput(UTXO out) throws BlockStoreException { maybeConnect(); // TODO: This should only need one query (maybe a stored procedure) if (getTransactionOutput(out.getHash(), out.getIndex()) == null) throw new BlockStoreException("Tried to remove a UTXO from DatabaseFullPrunedBlockStore that it didn't have!"); try { PreparedStatement s = conn.get() .prepareStatement(getDeleteOpenoutputsSQL()); s.setBytes(1, out.getHash().getBytes()); // index is actually an unsigned int s.setInt(2, (int)out.getIndex()); s.executeUpdate(); s.close(); } catch (SQLException e) { throw new BlockStoreException(e); } }
@Override public void removeUnspentTransactionOutput(UTXO out) throws BlockStoreException { maybeConnect(); // TODO: This should only need one query (maybe a stored procedure) if (getTransactionOutput(out.getHash(), out.getIndex()) == null) throw new BlockStoreException("Tried to remove a UTXO from DatabaseFullPrunedBlockStore that it didn't have!"); try { PreparedStatement s = conn.get() .prepareStatement(getDeleteOpenoutputsSQL()); s.setBytes(1, out.getHash().getBytes()); // index is actually an unsigned int s.setInt(2, (int)out.getIndex()); s.executeUpdate(); s.close(); } catch (SQLException e) { throw new BlockStoreException(e); } }
@Override public void removeUnspentTransactionOutput(UTXO out) throws BlockStoreException { maybeConnect(); // TODO: This should only need one query (maybe a stored procedure) if (getTransactionOutput(out.getHash(), out.getIndex()) == null) throw new BlockStoreException("Tried to remove a UTXO from DatabaseFullPrunedBlockStore that it didn't have!"); try { PreparedStatement s = conn.get() .prepareStatement(getDeleteOpenoutputsSQL()); s.setBytes(1, out.getHash().getBytes()); // index is actually an unsigned int s.setInt(2, (int)out.getIndex()); s.executeUpdate(); s.close(); } catch (SQLException e) { throw new BlockStoreException(e); } }