当前位置: 首页>>代码示例>>Java>>正文


Java TransactionOutPoint.getIndex方法代码示例

本文整理汇总了Java中org.bitcoinj.core.TransactionOutPoint.getIndex方法的典型用法代码示例。如果您正苦于以下问题:Java TransactionOutPoint.getIndex方法的具体用法?Java TransactionOutPoint.getIndex怎么用?Java TransactionOutPoint.getIndex使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.bitcoinj.core.TransactionOutPoint的用法示例。


在下文中一共展示了TransactionOutPoint.getIndex方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: putTxOutSpents

import org.bitcoinj.core.TransactionOutPoint; //导入方法依赖的package包/类
public void putTxOutSpents(Transaction tx)
{
  LinkedList<String> tx_outs = new LinkedList<String>();

    for(TransactionInput in : tx.getInputs())
    {
        if (!in.isCoinBase())
        {
            TransactionOutPoint out = in.getOutpoint();
            String key = out.getHash().toString() + ":" + out.getIndex();
            //file_db.addTxOutSpentByMap(key, tx.getHash());
            tx_outs.add(key);

        }
    }
}
 
开发者ID:fireduck64,项目名称:jelectrum,代码行数:17,代码来源:Importer.java

示例2: getValueSent

import org.bitcoinj.core.TransactionOutPoint; //导入方法依赖的package包/类
public Value getValueSent(TransactionWatcherWallet wallet) {
    if (isTrimmed) {
        return getValueSent();
    } else {
        tx.ensureParsed();
        // Find the value of the inputs that draw value from the wallet
        Value sent = type.value(0);
        Map<Sha256Hash, BitTransaction> transactions = wallet.getTransactions();
        for (TransactionInput input : tx.getInputs()) {
            TransactionOutPoint outPoint = input.getOutpoint();
            // This input is taking value from a transaction in our wallet. To discover the value,
            // we must find the connected transaction.
            OutPointOutput connected = wallet.getUnspentTxOutput(outPoint);
            if (connected == null) {
                BitTransaction spendingTx = transactions.get(outPoint.getHash());
                int index = (int) outPoint.getIndex();
                if (spendingTx != null && spendingTx.isOutputAvailable(index)) {
                    connected = new OutPointOutput(spendingTx, index);
                }
            }

            if (connected == null)
                continue;

            // The connected output may be the change to the sender of a previous input sent to this wallet. In this
            // case we ignore it.
            if (!connected.getOutput().isMineOrWatched(wallet))
                continue;

            sent = sent.add(connected.getValue());
        }

        return sent;
    }
}
 
开发者ID:filipnyquist,项目名称:lbry-android,代码行数:36,代码来源:BitTransaction.java

示例3: UnspentTx

import org.bitcoinj.core.TransactionOutPoint; //导入方法依赖的package包/类
public UnspentTx(TransactionOutPoint txop, long value, int height) {
    super(txop, height);
    this.txPos = (int) txop.getIndex();
    this.value = value;
}
 
开发者ID:filipnyquist,项目名称:lbry-android,代码行数:6,代码来源:ServerClient.java

示例4: get

import org.bitcoinj.core.TransactionOutPoint; //导入方法依赖的package包/类
public static TrimmedOutPoint get(TransactionOutPoint outPoint) {
    return new TrimmedOutPoint(outPoint.getParams(), outPoint.getIndex(), outPoint.getHash());
}
 
开发者ID:filipnyquist,项目名称:lbry-android,代码行数:4,代码来源:TrimmedOutPoint.java

示例5: OutPointOutput

import org.bitcoinj.core.TransactionOutPoint; //导入方法依赖的package包/类
public OutPointOutput(TransactionOutPoint outPoint, TransactionOutput output,
                      boolean isGenerated) {
    this(new TrimmedOutput(output, outPoint.getIndex(), outPoint.getHash()), isGenerated);
}
 
开发者ID:filipnyquist,项目名称:lbry-android,代码行数:5,代码来源:OutPointOutput.java


注:本文中的org.bitcoinj.core.TransactionOutPoint.getIndex方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。