本文整理汇总了Java中org.bitcoinj.core.TransactionOutPoint.getHash方法的典型用法代码示例。如果您正苦于以下问题:Java TransactionOutPoint.getHash方法的具体用法?Java TransactionOutPoint.getHash怎么用?Java TransactionOutPoint.getHash使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.bitcoinj.core.TransactionOutPoint
的用法示例。
在下文中一共展示了TransactionOutPoint.getHash方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: areSomeInputsPending
import org.bitcoinj.core.TransactionOutPoint; //导入方法依赖的package包/类
public boolean areSomeInputsPending(Transaction tx)
{
MemPoolInfo info = latest_info;
if (info == null) return false; //Hard to say
for(TransactionInput tx_in : tx.getInputs())
{
if (!tx_in.isCoinBase())
{
TransactionOutPoint tx_out = tx_in.getOutpoint();
Sha256Hash parent_hash = tx_out.getHash();
if (info.tx_set.contains(parent_hash)) return true;
}
}
return false;
}
示例2: HistoryTx
import org.bitcoinj.core.TransactionOutPoint; //导入方法依赖的package包/类
public HistoryTx(TransactionOutPoint txop, int height) {
this.txHash = txop.getHash();
this.height = height;
}
示例3: get
import org.bitcoinj.core.TransactionOutPoint; //导入方法依赖的package包/类
public static TrimmedOutPoint get(TransactionOutPoint outPoint) {
return new TrimmedOutPoint(outPoint.getParams(), outPoint.getIndex(), outPoint.getHash());
}
示例4: OutPointOutput
import org.bitcoinj.core.TransactionOutPoint; //导入方法依赖的package包/类
public OutPointOutput(TransactionOutPoint outPoint, TransactionOutput output,
boolean isGenerated) {
this(new TrimmedOutput(output, outPoint.getIndex(), outPoint.getHash()), isGenerated);
}
示例5: sendUnspent
import org.bitcoinj.core.TransactionOutPoint; //导入方法依赖的package包/类
public void sendUnspent(StratumConnection conn, Object request_id, ByteString target)
throws AddressFormatException
{
try
{
Subscriber sub = new Subscriber(conn, request_id);
JSONObject reply = sub.startReply();
Collection<TransactionOutPoint> outs = jelly.getUtxoSource().getUnspentForScriptHash(target);
JSONArray arr =new JSONArray();
for(TransactionOutPoint out : outs)
{
JSONObject o = new JSONObject();
o.put("tx_hash", out.getHash().toString());
o.put("tx_pos", out.getIndex());
SortedTransaction s_tx = new SortedTransaction(out.getHash(), false);
Transaction tx = s_tx.tx;
long value = tx.getOutput((int)out.getIndex()).getValue().longValue();
o.put("value",value);
o.put("height", s_tx.getEffectiveHeight());
arr.put(o);
}
reply.put("result", arr);
sub.sendReply(reply);
}
catch(org.json.JSONException e)
{
throw new RuntimeException(e);
}
}