mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-08-03 12:16:27 -04:00
document signing accounts in deployment guide, minor fixes
This commit is contained in:
parent
f6b33e877f
commit
af38f82406
6 changed files with 28 additions and 16 deletions
|
@ -23,6 +23,7 @@ import haveno.common.app.Capability;
|
|||
import haveno.common.crypto.Hash;
|
||||
import haveno.common.proto.ProtoUtil;
|
||||
import haveno.common.util.Utilities;
|
||||
import haveno.core.trade.HavenoUtils;
|
||||
import haveno.network.p2p.storage.P2PDataStorage;
|
||||
import haveno.network.p2p.storage.payload.CapabilityRequiringPayload;
|
||||
import haveno.network.p2p.storage.payload.DateTolerantPayload;
|
||||
|
@ -30,7 +31,6 @@ import haveno.network.p2p.storage.payload.PersistableNetworkPayload;
|
|||
import haveno.network.p2p.storage.payload.ProcessOncePersistableNetworkPayload;
|
||||
import lombok.Value;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.bitcoinj.core.Coin;
|
||||
|
||||
import java.time.Clock;
|
||||
import java.time.Instant;
|
||||
|
@ -176,7 +176,7 @@ public class SignedWitness implements ProcessOncePersistableNetworkPayload, Pers
|
|||
",\n signerPubKey=" + Utilities.bytesAsHexString(signerPubKey) +
|
||||
",\n witnessOwnerPubKey=" + Utilities.bytesAsHexString(witnessOwnerPubKey) +
|
||||
",\n date=" + Instant.ofEpochMilli(date) +
|
||||
",\n tradeAmount=" + Coin.valueOf(tradeAmount).toFriendlyString() +
|
||||
",\n tradeAmount=" + HavenoUtils.formatXmr(tradeAmount, true) +
|
||||
",\n hash=" + Utilities.bytesAsHexString(hash) +
|
||||
"\n}";
|
||||
}
|
||||
|
|
|
@ -35,7 +35,6 @@ import haveno.network.p2p.P2PService;
|
|||
import haveno.network.p2p.storage.P2PDataStorage;
|
||||
import haveno.network.p2p.storage.persistence.AppendOnlyDataStoreService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.bitcoinj.core.Coin;
|
||||
import org.bitcoinj.core.ECKey;
|
||||
import org.bitcoinj.core.Utils;
|
||||
|
||||
|
@ -62,7 +61,7 @@ import java.util.stream.Collectors;
|
|||
public class SignedWitnessService {
|
||||
public static final long SIGNER_AGE_DAYS = 30;
|
||||
private static final long SIGNER_AGE = SIGNER_AGE_DAYS * ChronoUnit.DAYS.getDuration().toMillis();
|
||||
public static final BigInteger MINIMUM_TRADE_AMOUNT_FOR_SIGNING = HavenoUtils.coinToAtomicUnits(Coin.parseCoin("0.0025"));
|
||||
public static final BigInteger MINIMUM_TRADE_AMOUNT_FOR_SIGNING = HavenoUtils.xmrToAtomicUnits(.1);
|
||||
|
||||
private final KeyRing keyRing;
|
||||
private final P2PService p2PService;
|
||||
|
|
|
@ -844,7 +844,7 @@ public class AccountAgeWitnessService {
|
|||
}
|
||||
|
||||
public SignState getSignState(Trade trade) {
|
||||
if (trade instanceof ArbitratorTrade) return SignState.UNSIGNED; // TODO (woodser): arbitrator has two peers
|
||||
if (trade instanceof ArbitratorTrade) return SignState.UNSIGNED;
|
||||
return findTradePeerWitness(trade)
|
||||
.map(this::getSignState)
|
||||
.orElse(SignState.UNSIGNED);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue