use of com.sparrowwallet.drongo.wallet.BlockTransactionHashIndex in project sparrow by sparrowwallet.
the class BlockTransactionHashIndexMapper method map.
@Override
public BlockTransactionHashIndex map(ResultSet rs, StatementContext ctx) throws SQLException {
BlockTransactionHashIndex blockTransactionHashIndex = new BlockTransactionHashIndex(Sha256Hash.wrap(rs.getBytes("blockTransactionHashIndex.hash")), rs.getInt("blockTransactionHashIndex.height"), rs.getTimestamp("blockTransactionHashIndex.date"), rs.getLong("blockTransactionHashIndex.fee"), rs.getLong("blockTransactionHashIndex.index"), rs.getLong("blockTransactionHashIndex.outputValue"), null, rs.getString("blockTransactionHashIndex.label"));
blockTransactionHashIndex.setId(rs.getLong("blockTransactionHashIndex.id"));
int statusIndex = rs.getInt("blockTransactionHashIndex.status");
if (!rs.wasNull()) {
blockTransactionHashIndex.setStatus(Status.values()[statusIndex]);
}
return blockTransactionHashIndex;
}
use of com.sparrowwallet.drongo.wallet.BlockTransactionHashIndex in project sparrow by sparrowwallet.
the class WalletNodeDao method addTransactionOutputs.
default void addTransactionOutputs(WalletNode addressNode) {
for (BlockTransactionHashIndex txo : addressNode.getTransactionOutputs()) {
txo.setId(null);
if (txo.isSpent()) {
txo.getSpentBy().setId(null);
}
addOrUpdate(addressNode, txo);
}
}
Aggregations