@Override public NetworkParameters getParams() { return context.getParams(); } }
@Override public NetworkParameters getParams() { return context.getParams(); } }
MasternodePing(Context context) { super(context.getParams()); this.context = context; } /*MasternodePing(NetworkParameters context, AbstractBlockChain blockChain, TransactionInput newVin)
public Masternode(Context context, byte [] payload, int cursor) { super(context.getParams(), payload, cursor); this.context = context; //calculateScoreTest(); }
/** * Get network parameters * @return network parameters for the server */ @Override public NetworkParameters getNetParams() { return context.getParams(); }
/** * Creates a new WalletAppKit, with the given {@link Context}. Files will be stored in the given directory. */ public WalletAppKit(Context context, File directory, String filePrefix) { this.context = context; this.params = checkNotNull(context.getParams()); this.directory = checkNotNull(directory); this.filePrefix = checkNotNull(filePrefix); }
/** * Creates a new WalletAppKit, with the given {@link Context}. Files will be stored in the given directory. */ public WalletAppKit(Context context, File directory, String filePrefix) { this.context = context; this.params = checkNotNull(context.getParams()); this.directory = checkNotNull(directory); this.filePrefix = checkNotNull(filePrefix); }
/** * Creates a new WalletAppKit, with the given {@link Context}. Files will be stored in the given directory. */ public WalletAppKit(Context context, File directory, String filePrefix, boolean useSegwit) { this.context = context; this.params = checkNotNull(context.getParams()); this.directory = checkNotNull(directory); this.filePrefix = checkNotNull(filePrefix); this.useSegwit = useSegwit; }
/** * Creates a new, empty wallet with a randomly chosen seed and no transactions. Make sure to provide for sufficient * backup! Any keys will be derived from the seed. If you want to restore a wallet from disk instead, see * {@link #loadFromFile}. */ public Wallet(Context context) { this(context, new KeyChainGroup(context.getParams())); }
/** * Creates a new, empty wallet with a randomly chosen seed and no transactions. Make sure to provide for sufficient * backup! Any keys will be derived from the seed. If you want to restore a wallet from disk instead, see * {@link #loadFromFile}. */ public Wallet(Context context) { this(context, new KeyChainGroup(context.getParams())); }
/** * Creates a new, empty wallet with a randomly chosen seed and no transactions. Make sure to provide for sufficient * backup! Any keys will be derived from the seed. If you want to restore a wallet from disk instead, see * {@link #loadFromFile}. */ public Wallet(Context context) { this(context, new KeyChainGroup(context.getParams())); }
/** * Creates a new WalletAppKit, with the given {@link Context}. Files will be stored in the given directory. */ public WalletAppKit(Context context, File directory, String filePrefix) { this.context = context; this.params = checkNotNull(context.getParams()); this.directory = checkNotNull(directory); this.filePrefix = checkNotNull(filePrefix); context.initDash(true, true); context.initDashSync(directory.getAbsolutePath()); }
void createEmptyTxLockCandidate(Sha256Hash txHash) { if(mapTxLockCandidates.containsKey(txHash)) return; log.info("CInstantSend::CreateEmptyTxLockCandidate -- new, txid=%s"+ txHash.toString()); TransactionLockRequest txLockRequest = null; mapTxLockCandidates.put(txHash, new TransactionLockCandidate(context.getParams(), txLockRequest)); }
/** * Construct a BitcoinClient from Network Parameters, URI, user name, and password. * @param netParams Correct Network Parameters for destination server * @param server URI of the Bitcoin RPC server * @param rpcuser Username (if required) * @param rpcpassword Password (if required) */ public BitcoinClient(NetworkParameters netParams, URI server, String rpcuser, String rpcpassword) { super(server, rpcuser, rpcpassword); this.context = new Context(netParams); mapper.registerModule(new RpcClientModule(context.getParams())); }
boolean setSporkAddress(String strAddress) { try { Address address = Address.fromBase58(context.getParams(), strAddress); sporkPubKeyId = address.getHash160(); } catch (AddressFormatException x) { log.error("CSporkManager::SetSporkAddress -- Failed to parse spork address"); return false; } return true; }
@Override @Nullable public synchronized StoredBlock get(Sha256Hash hash) throws BlockStoreException { byte[] bits = db.get(hash.getBytes()); if (bits == null) return null; return StoredBlock.deserializeCompact(context.getParams(), ByteBuffer.wrap(bits)); }
@Override @Nullable public synchronized StoredBlock get(Sha256Hash hash) throws BlockStoreException { byte[] bits = db.get(hash.getBytes()); if (bits == null) return null; return StoredBlock.deserializeCompact(context.getParams(), ByteBuffer.wrap(bits)); }
/** * Get a "raw" transaction (which we map to a bitcoinj transaction) * @param txid Transaction ID/hash * @return bitcoinj Transaction * @throws JsonRpcStatusException JSON RPC status exception * @throws IOException network error */ public Transaction getRawTransaction(Sha256Hash txid) throws JsonRpcStatusException, IOException { String hexEncoded = send("getrawtransaction", txid); byte[] raw = HexUtil.hexStringToByteArray(hexEncoded); return new Transaction(context.getParams(), raw); }
private synchronized void initStoreIfNeeded() throws BlockStoreException { if (db.get(CHAIN_HEAD_KEY) != null) return; // Already initialised. Block genesis = context.getParams().getGenesisBlock().cloneAsHeader(); StoredBlock storedGenesis = new StoredBlock(genesis, genesis.getWork(), 0); put(storedGenesis); setChainHead(storedGenesis); }
private synchronized void initStoreIfNeeded() throws BlockStoreException { if (db.get(CHAIN_HEAD_KEY) != null) return; // Already initialised. Block genesis = context.getParams().getGenesisBlock().cloneAsHeader(); StoredBlock storedGenesis = new StoredBlock(genesis, genesis.getWork(), 0); put(storedGenesis); setChainHead(storedGenesis); }