Add accountSalt to tradingPeer

This commit is contained in:
Manfred Karrer 2017-09-25 12:27:56 -05:00
parent 5d960dd901
commit 952c0d00ad
No known key found for this signature in database
GPG key ID: 401250966A6B2C46
2 changed files with 3 additions and 0 deletions

View file

@ -1167,6 +1167,7 @@ message TradingPeer {
repeated RawTransactionInput raw_transaction_inputs = 9;
int64 change_output_value = 10;
string change_output_address = 11;
bytes account_salt = 12;
}

View file

@ -80,6 +80,7 @@ public final class TradingPeer implements PersistablePayload {
Optional.ofNullable(multiSigPubKey).ifPresent(e -> builder.setMultiSigPubKey(ByteString.copyFrom(multiSigPubKey)));
Optional.ofNullable(rawTransactionInputs).ifPresent(e -> builder.addAllRawTransactionInputs(ProtoUtil.collectionToProto(rawTransactionInputs)));
Optional.ofNullable(changeOutputAddress).ifPresent(builder::setChangeOutputAddress);
Optional.ofNullable(accountSalt).ifPresent(e -> builder.setAccountSalt(ByteString.copyFrom(accountSalt)));
return builder.build();
}
@ -104,6 +105,7 @@ public final class TradingPeer implements PersistablePayload {
.collect(Collectors.toList());
tradingPeer.setRawTransactionInputs(rawTransactionInputs);
tradingPeer.setChangeOutputAddress(ProtoUtil.stringOrNullFromProto(proto.getChangeOutputAddress()));
tradingPeer.setAccountSalt(ProtoUtil.byteArrayOrNullFromProto(proto.getAccountSalt()));
return tradingPeer;
}
}