use of co.rsk.peg.bitcoin.RskAllowUnconfirmedCoinSelector in project rskj by rsksmart.
the class BridgeUtils method getFederationsSpendWallet.
public static Wallet getFederationsSpendWallet(Context btcContext, List<Federation> federations, List<UTXO> utxos, boolean isFastBridgeCompatible, BridgeStorageProvider storageProvider) {
Wallet wallet;
if (isFastBridgeCompatible) {
wallet = new FastBridgeCompatibleBtcWalletWithStorage(btcContext, federations, storageProvider);
} else {
wallet = new BridgeBtcWallet(btcContext, federations);
}
RskUTXOProvider utxoProvider = new RskUTXOProvider(btcContext.getParams(), utxos);
wallet.setUTXOProvider(utxoProvider);
federations.forEach(federation -> wallet.addWatchedAddress(federation.getAddress(), federation.getCreationTime().toEpochMilli()));
wallet.setCoinSelector(new RskAllowUnconfirmedCoinSelector());
return wallet;
}
use of co.rsk.peg.bitcoin.RskAllowUnconfirmedCoinSelector in project rskj by rsksmart.
the class BridgeUtils method getFederationsSpendWallet.
public static Wallet getFederationsSpendWallet(Context btcContext, List<Federation> federations, List<UTXO> utxos) {
Wallet wallet = new BridgeBtcWallet(btcContext, federations);
RskUTXOProvider utxoProvider = new RskUTXOProvider(btcContext.getParams(), utxos);
wallet.setUTXOProvider(utxoProvider);
federations.stream().forEach(federation -> {
wallet.addWatchedAddress(federation.getAddress(), federation.getCreationTime().toEpochMilli());
});
wallet.setCoinSelector(new RskAllowUnconfirmedCoinSelector());
return wallet;
}
use of co.rsk.peg.bitcoin.RskAllowUnconfirmedCoinSelector in project rskj by rsksmart.
the class BridgeSupport method getFastBridgeWallet.
protected Wallet getFastBridgeWallet(Context btcContext, List<UTXO> utxos, FastBridgeFederationInformation fb) {
Wallet wallet = new FastBridgeCompatibleBtcWalletWithSingleScript(btcContext, getLiveFederations(), fb);
RskUTXOProvider utxoProvider = new RskUTXOProvider(btcContext.getParams(), utxos);
wallet.setUTXOProvider(utxoProvider);
wallet.setCoinSelector(new RskAllowUnconfirmedCoinSelector());
return wallet;
}
Aggregations