mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-20 02:12:00 +01:00
Improve naming, cleanups, use static imports
This commit is contained in:
parent
3276c80d9b
commit
d0bb421839
@ -53,10 +53,10 @@ public abstract class ProcessBsqSwapFinalizedTxMessage extends BsqSwapTask {
|
||||
Transaction buyersTransactionWithoutSigs = protocolModel.getBtcWalletService().getTxFromSerializedTx(message.getTx());
|
||||
int buyersInputSize = Objects.requireNonNull(protocolModel.getTradePeer().getInputs()).size();
|
||||
Objects.requireNonNull(buyersTransactionWithoutSigs.getInputs()).stream()
|
||||
.filter(i -> i.getIndex() < buyersInputSize)
|
||||
.forEach(i -> {
|
||||
i.clearScriptBytes();
|
||||
i.setWitness(TransactionWitness.EMPTY);
|
||||
.filter(input -> input.getIndex() < buyersInputSize)
|
||||
.forEach(input -> {
|
||||
input.clearScriptBytes();
|
||||
input.setWitness(TransactionWitness.EMPTY);
|
||||
});
|
||||
byte[] sellersPartiallySignedTx = protocolModel.getTx();
|
||||
checkArgument(Arrays.equals(buyersTransactionWithoutSigs.bitcoinSerialize(), sellersPartiallySignedTx),
|
||||
|
@ -36,6 +36,9 @@ import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import static org.bitcoinj.core.TransactionConfidence.ConfidenceType.BUILDING;
|
||||
import static org.bitcoinj.core.TransactionConfidence.ConfidenceType.PENDING;
|
||||
|
||||
@Slf4j
|
||||
public abstract class SellerSetupTxListener extends BsqSwapTask {
|
||||
@Nullable
|
||||
@ -93,7 +96,6 @@ public abstract class SellerSetupTxListener extends BsqSwapTask {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private boolean processConfidence(TransactionConfidence confidence) {
|
||||
if (confidence == null) {
|
||||
return false;
|
||||
@ -126,8 +128,8 @@ public abstract class SellerSetupTxListener extends BsqSwapTask {
|
||||
|
||||
private boolean isInNetwork(TransactionConfidence confidence) {
|
||||
return confidence != null &&
|
||||
(confidence.getConfidenceType().equals(TransactionConfidence.ConfidenceType.BUILDING) ||
|
||||
confidence.getConfidenceType().equals(TransactionConfidence.ConfidenceType.PENDING));
|
||||
(confidence.getConfidenceType().equals(BUILDING) ||
|
||||
confidence.getConfidenceType().equals(PENDING));
|
||||
}
|
||||
|
||||
private void cleanup() {
|
||||
|
Loading…
Reference in New Issue
Block a user