mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-04-19 07:15:54 -04:00
Update to BitcoinJ 0.12.2
This commit is contained in:
parent
29cfdd2301
commit
46a56e4e4f
@ -39,7 +39,7 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile 'org.bitcoinj:bitcoinj-core:0.12'
|
||||
compile 'org.bitcoinj:bitcoinj-core:0.12.2'
|
||||
compile 'net.tomp2p:tomp2p-all:5.0-Alpha.8f1cafb-SNAPSHOT'
|
||||
compile 'org.springframework:spring-core:4.1.1.RELEASE'
|
||||
compile 'net.sf.jopt-simple:jopt-simple:4.8'
|
||||
|
@ -364,13 +364,11 @@ public class WalletService {
|
||||
|
||||
private AddressEntry getNewAddressEntry(AddressEntry.AddressContext addressContext, String offerId) {
|
||||
lock.lock();
|
||||
wallet.getLock().lock();
|
||||
DeterministicKey key = wallet.freshReceiveKey();
|
||||
AddressEntry addressEntry = new AddressEntry(key, params, addressContext, offerId);
|
||||
addressEntryList.add(addressEntry);
|
||||
saveAddressInfoList();
|
||||
lock.unlock();
|
||||
wallet.getLock().unlock();
|
||||
return addressEntry;
|
||||
}
|
||||
|
||||
|
@ -29,6 +29,7 @@ import org.bitcoinj.utils.Fiat;
|
||||
import org.bitcoinj.utils.MonetaryFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
|
||||
import java.text.DateFormat;
|
||||
import java.text.DecimalFormat;
|
||||
@ -66,7 +67,8 @@ public class BSFormatter {
|
||||
// Input of a group separator (1,123,45) lead to an validation error.
|
||||
// Note: BtcFormat was intended to be used, but it lead to many problems (automatic format to mBit,
|
||||
// no way to remove grouping separator). It seems to be not optimal for user input formatting.
|
||||
private MonetaryFormat coinFormat = MonetaryFormat.BTC.repeatOptionalDecimals(2, 1);
|
||||
private MonetaryFormat coinFormat = MonetaryFormat.BTC.optionalDecimals(2)
|
||||
.roundingMode(RoundingMode.HALF_UP);
|
||||
|
||||
private String currencyCode = Currency.getInstance(Locale.getDefault()).getCurrencyCode();
|
||||
|
||||
|
@ -85,7 +85,7 @@ public class TomP2PTests {
|
||||
private static final Logger log = LoggerFactory.getLogger(TomP2PTests.class);
|
||||
|
||||
// If you want to test in one specific connection mode define it directly, otherwise use UNKNOWN
|
||||
private static final ConnectionType FORCED_CONNECTION_TYPE = ConnectionType.MANUAL_PORT_FORWARDING;
|
||||
private static final ConnectionType FORCED_CONNECTION_TYPE = ConnectionType.DIRECT;
|
||||
|
||||
// Typically you run the bootstrap node in localhost to test direct connection.
|
||||
// If you have a setup where you are not behind a router you can also use a WAN bootstrap node.
|
||||
|
Loading…
x
Reference in New Issue
Block a user