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


Java TransactionOutPoint.getHash方法代码示例

本文整理汇总了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;
}
 
开发者ID:fireduck64,项目名称:jelectrum,代码行数:17,代码来源:MemPooler.java

示例2: HistoryTx

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

示例3: 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

示例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);
}
 
开发者ID:filipnyquist,项目名称:lbry-android,代码行数:5,代码来源:OutPointOutput.java

示例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);
  }
}
 
开发者ID:fireduck64,项目名称:jelectrum,代码行数:43,代码来源:ElectrumNotifier.java


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