Commit 42c8322c authored by bitcoinj-sv's avatar bitcoinj-sv

btc to bsv,

broadcast to all
parent 435f0a48
......@@ -148,8 +148,8 @@ public class TransactionBroadcast {
// our version message, as SPV nodes cannot relay it doesn't give away any additional information
// to skip the inv here - we wouldn't send invs anyway.
int numConnected = peers.size();
int numToBroadcastTo = (int) Math.max(1, Math.round(Math.ceil(peers.size() / 2.0)));
numWaitingFor = (int) Math.ceil((peers.size() - numToBroadcastTo) / 2.0);
int numToBroadcastTo = numConnected;
numWaitingFor = 2;
Collections.shuffle(peers, random);
peers = peers.subList(0, numToBroadcastTo);
log.info("broadcastTransaction: We have {} peers, adding {} to the memory pool", numConnected, tx.getHashAsString());
......
......@@ -75,8 +75,6 @@ public class MainNetParams extends AbstractBitcoinNetParams {
dnsSeeds = new String[] {
"seed.bitcoinsv.io", // Bitcoin SV seeder
"btccash-seeder.bitcoinunlimited.info", // BU backed seeder
"seed.bitprim.org", // Bitprim
"seed.deadalnix.me",// Amaury SÉCHET
"seeder.criptolayer.net",// criptolayer.net
};
httpSeeds = null; /* new HttpDiscovery.Details[] {
......
......@@ -54,11 +54,11 @@ public final class MonetaryFormat {
/** Standard format for fiat amounts. */
public static final MonetaryFormat FIAT = new MonetaryFormat().shift(0).minDecimals(2).repeatOptionalDecimals(2, 1);
/** Currency code for base 1 Bitcoin. */
public static final String CODE_BTC = "BTC";
public static final String CODE_BTC = "BSV";
/** Currency code for base 1/1000 Bitcoin. */
public static final String CODE_MBTC = "mBTC";
public static final String CODE_MBTC = "mBSV";
/** Currency code for base 1/1000000 Bitcoin. */
public static final String CODE_UBTC = "µBTC";
public static final String CODE_UBTC = "µBSV";
public static final int MAX_DECIMALS = 8;
......
......@@ -109,10 +109,10 @@ public class CoinTest {
@Test
public void testToFriendlyString() {
assertEquals("1.00 BTC", COIN.toFriendlyString());
assertEquals("1.23 BTC", valueOf(1, 23).toFriendlyString());
assertEquals("0.001 BTC", COIN.divide(1000).toFriendlyString());
assertEquals("-1.23 BTC", valueOf(1, 23).negate().toFriendlyString());
assertEquals("1.00 BSV", COIN.toFriendlyString());
assertEquals("1.23 BSV", valueOf(1, 23).toFriendlyString());
assertEquals("0.001 BSV", COIN.divide(1000).toFriendlyString());
assertEquals("-1.23 BSV", valueOf(1, 23).negate().toFriendlyString());
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment