Java 类org.bitcoinj.core.UTXO 实例源码

项目:cryptwallet    文件:LevelDBFullPrunedBlockStore.java   
@Override
public void beginDatabaseBatchWrite() throws BlockStoreException {
    // This is often called twice in row! But they are not nested
    // transactions!
    // We just ignore the second call.
    if (!autoCommit) {
        return;
    }
    if (instrument)
        beginMethod("beginDatabaseBatchWrite");

    batch = db.createWriteBatch();
    uncommited = new HashMap<ByteBuffer, byte[]>();
    uncommitedDeletes = new HashSet<ByteBuffer>();
    utxoUncommittedCache = new HashMap<ByteBuffer, UTXO>();
    utxoUncommittedDeletedCache = new HashSet<ByteBuffer>();
    autoCommit = false;
    if (instrument)
        endMethod("beginDatabaseBatchWrite");
}
项目:dashj    文件:LevelDBFullPrunedBlockStore.java   
@Override
public void beginDatabaseBatchWrite() throws BlockStoreException {
    // This is often called twice in row! But they are not nested
    // transactions!
    // We just ignore the second call.
    if (!autoCommit) {
        return;
    }
    if (instrument)
        beginMethod("beginDatabaseBatchWrite");

    batch = db.createWriteBatch();
    uncommited = new HashMap<ByteBuffer, byte[]>();
    uncommitedDeletes = new HashSet<ByteBuffer>();
    utxoUncommittedCache = new HashMap<ByteBuffer, UTXO>();
    utxoUncommittedDeletedCache = new HashSet<ByteBuffer>();
    autoCommit = false;
    if (instrument)
        endMethod("beginDatabaseBatchWrite");
}
项目:okwallet    文件:Wallet.java   
/**
 * Get all the {@link UTXO}'s from the {@link UTXOProvider} based on keys that the
 * wallet contains.
 * @return The list of stored outputs.
 */
protected List<UTXO> getStoredOutputsFromUTXOProvider() throws UTXOProviderException {
    UTXOProvider utxoProvider = checkNotNull(vUTXOProvider, "No UTXO provider has been set");
    List<UTXO> candidates = new ArrayList<>();
    List<ECKey> keys = getImportedKeys();
    keys.addAll(getActiveKeyChain().getLeafKeys());
    List<Address> addresses = new ArrayList<>();
    for (ECKey key : keys) {
        Address address = new Address(params, key.getPubKeyHash());
        addresses.add(address);
    }
    candidates.addAll(utxoProvider.getOpenTransactionOutputs(addresses));
    return candidates;
}
项目:okwallet    文件:RequestWalletBalanceTask.java   
protected void onResult(final Set<UTXO> utxos) {
    callbackHandler.post(new Runnable() {
        @Override
        public void run() {
            resultCallback.onResult(utxos);
        }
    });
}
项目:cryptwallet    文件:Wallet.java   
/**
 * Get all the {@link UTXO}'s from the {@link UTXOProvider} based on keys that the
 * wallet contains.
 * @return The list of stored outputs.
 */
protected List<UTXO> getStoredOutputsFromUTXOProvider() throws UTXOProviderException {
    UTXOProvider utxoProvider = checkNotNull(vUTXOProvider, "No UTXO provider has been set");
    List<UTXO> candidates = new ArrayList<UTXO>();
    List<ECKey> keys = getImportedKeys();
    keys.addAll(getActiveKeyChain().getLeafKeys());
    List<Address> addresses = new ArrayList<Address>();
    for (ECKey key : keys) {
        Address address = new Address(params, key.getPubKeyHash());
        addresses.add(address);
    }
    candidates.addAll(utxoProvider.getOpenTransactionOutputs(addresses));
    return candidates;
}
项目:bitcoinj    文件:Wallet.java   
/**
 * Get all the {@link UTXO}'s from the {@link UTXOProvider} based on keys that the
 * wallet contains.
 * @return The list of stored outputs.
 */
protected List<UTXO> getStoredOutputsFromUTXOProvider() throws UTXOProviderException {
    UTXOProvider utxoProvider = checkNotNull(vUTXOProvider, "No UTXO provider has been set");
    List<UTXO> candidates = new ArrayList<>();
    List<ECKey> keys = getImportedKeys();
    keys.addAll(getActiveKeyChain().getLeafKeys());
    List<Address> addresses = new ArrayList<>();
    for (ECKey key : keys) {
        Address address = new Address(params, key.getPubKeyHash());
        addresses.add(address);
    }
    candidates.addAll(utxoProvider.getOpenTransactionOutputs(addresses));
    return candidates;
}
项目:okwallet    文件:Wallet.java   
/**
 * Construct a free standing Transaction Output.
 * @param params The network parameters.
 * @param output The stored output (free standing).
 */
public FreeStandingTransactionOutput(NetworkParameters params, UTXO output, int chainHeight) {
    super(params, null, output.getValue(), output.getScript().getProgram());
    this.output = output;
    this.chainHeight = chainHeight;
}
项目:okwallet    文件:LevelDBFullPrunedBlockStore.java   
@Override
protected boolean removeEldestEntry(Map.Entry<ByteBuffer, UTXO> eldest) {
    return size() > this.capacity;
}
项目:cryptwallet    文件:Wallet.java   
/**
 * Construct a free standing Transaction Output.
 * @param params The network parameters.
 * @param output The stored output (free standing).
 */
public FreeStandingTransactionOutput(NetworkParameters params, UTXO output, int chainHeight) {
    super(params, null, output.getValue(), output.getScript().getProgram());
    this.output = output;
    this.chainHeight = chainHeight;
}
项目:cryptwallet    文件:LevelDBFullPrunedBlockStore.java   
@Override
protected boolean removeEldestEntry(Map.Entry<ByteBuffer, UTXO> eldest) {
    return size() > this.capacity;
}
项目:dashj    文件:LevelDBFullPrunedBlockStore.java   
@Override
protected boolean removeEldestEntry(Map.Entry<ByteBuffer, UTXO> eldest) {
    return size() > this.capacity;
}
项目:bitcoinj    文件:Wallet.java   
/**
 * Construct a free standing Transaction Output.
 * @param params The network parameters.
 * @param output The stored output (free standing).
 */
public FreeStandingTransactionOutput(NetworkParameters params, UTXO output, int chainHeight) {
    super(params, null, output.getValue(), output.getScript().getProgram());
    this.output = output;
    this.chainHeight = chainHeight;
}
项目:bitcoinj    文件:LevelDBFullPrunedBlockStore.java   
@Override
protected boolean removeEldestEntry(Map.Entry<ByteBuffer, UTXO> eldest) {
    return size() > this.capacity;
}
项目:okwallet    文件:Wallet.java   
/**
 * Get the {@link UTXO}.
 * @return The stored output.
 */
public UTXO getUTXO() {
    return output;
}
项目:cryptwallet    文件:Wallet.java   
/**
 * Get the {@link UTXO}.
 * @return The stored output.
 */
public UTXO getUTXO() {
    return output;
}
项目:exchange    文件:BsqUtxoTransactionOutput.java   
/**
 * Construct a free standing Transaction Output.
 *
 * @param params The network parameters.
 * @param output The stored output (free standing).
 */
public BsqUtxoTransactionOutput(NetworkParameters params, UTXO output, int chainHeight) {
    super(params, null, output.getValue(), output.getScript().getProgram());
    this.output = output;
    this.chainHeight = chainHeight;
}
项目:exchange    文件:BsqUtxoTransactionOutput.java   
/**
 * Get the {@link UTXO}.
 *
 * @return The stored output.
 */
public UTXO getUTXO() {
    return output;
}
项目:bitcoinj    文件:Wallet.java   
/**
 * Get the {@link UTXO}.
 * @return The stored output.
 */
public UTXO getUTXO() {
    return output;
}
项目:okwallet    文件:RequestWalletBalanceTask.java   
void onResult(Set<UTXO> utxos);