@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; TransactionInput other = (TransactionInput) o; return sequence == other.sequence && parent == other.parent && outpoint.equals(other.outpoint) && Arrays.equals(scriptBytes, other.scriptBytes); }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; TransactionInput other = (TransactionInput) o; return sequence == other.sequence && parent == other.parent && outpoint.equals(other.outpoint) && Arrays.equals(scriptBytes, other.scriptBytes); }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; TransactionInput other = (TransactionInput) o; return sequence == other.sequence && parent == other.parent && outpoint.equals(other.outpoint) && Arrays.equals(scriptBytes, other.scriptBytes); }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; TransactionInput other = (TransactionInput) o; return sequence == other.sequence && parent == other.parent && outpoint.equals(other.outpoint) && Arrays.equals(scriptBytes, other.scriptBytes); }
public Masternode find(TransactionInput vin) { lock.lock(); try { //BOOST_FOREACH(CMasternode & mn, vMasternodes) for (Masternode mn : vMasternodes) { if (mn.vin.getOutpoint().equals(vin.getOutpoint())) return mn; } return null; } finally { lock.unlock(); } }
private static boolean checkTransactionInputs(TransactionInput txInputToCheck, List<TransactionInput> txInputs) { // Find the matching transactionInput, matching by the outpoint the transaction input it is spending for (TransactionInput txInput : txInputs) { if (txInputToCheck.getOutpoint() != null) { if (txInputToCheck.getOutpoint().equals(txInput.getOutpoint())) { return true; } } else { // Output is null, matching fails log.debug("No output to match on, matching fails"); } } return false; }
while (it2.hasNext()) { Map.Entry<TransactionOutPoint, Long> e = it2.next(); if (e.getKey().equals(mn.vin.getOutpoint())) {
boolean addSig(final TransactionInput vin) { for(DarkSendEntryVin s : sev) { if(s.vin.getOutpoint().equals(vin.getOutpoint()) && s.vin.getSequenceNumber() == vin.getSequenceNumber()){ if(s.isSigSet){return false;} s.vin.setScriptSig(vin.getScriptSig()); //TODO: ???? s.vin.prevPubKey = vin.prevPubKey; s.isSigSet = true; return true; } } return false; }
private static Transaction signTransaction (Transaction transaction, Wallet wallet) { //TODO: Currently only working if we have P2PKH outputs in our wallet int j = 0; for (int i = 0; i < transaction.getInputs().size(); ++i) { TransactionInput input = transaction.getInput(i); Optional<TransactionOutput> optional = wallet.calculateAllSpendCandidates().stream().filter(out -> input.getOutpoint().equals(out.getOutPointFor())).findAny(); if (optional.isPresent()) { TransactionOutput output = optional.get(); Address address = output.getAddressFromP2PKHScript(Constants.getNetwork()); //Only sign P2PKH and only those that we possess the key for.. if (address != null) { ECKey key = wallet.findKeyFromPubHash(address.getHash160()); if (key != null) { TransactionSignature sig = Tools.getSignature(transaction, i, output, key); byte[] s = sig.encodeToBitcoin(); ScriptBuilder builder = new ScriptBuilder(); builder.data(s); builder.data(key.getPubKey()); transaction.getInput(i).setScriptSig(builder.build()); } } } } return transaction; }
for (Pair<Long, TransactionInput> s : vecMasternodeScores) { rank++; if(s.getSecond().getOutpoint().equals(vin.getOutpoint())) { return rank;
if(DarkCoinSystem.fMasterNode && vin.getOutpoint().equals(context.activeMasternode.vin.getOutpoint()) && pubKeyMasternode.equals(context.activeMasternode.pubKeyMasternode)) return true;