Skip to content

Commit

Permalink
add refHeight to wallet buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
Rikski committed Jul 29, 2015
1 parent 764e1fc commit 65013a5
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ private static Protos.Transaction makeTxProto(WalletTransaction wtx) {
txBuilder.setPool(getProtoPool(wtx))
.setHash(hashToByteString(tx.getHash()))
.setVersion((int) tx.getVersion());
.setRefHeight((int)tx.getRefHeight());

if (tx.getUpdateTime() != null) {
txBuilder.setUpdatedAt(tx.getUpdateTime().getTime());
Expand Down Expand Up @@ -594,6 +595,9 @@ private void readTransaction(Protos.Transaction txProto, NetworkParameters param
// Old wallet: assume a user payment as that's the only reason a new tx would have been created back then.
tx.setPurpose(Transaction.Purpose.USER_PAYMENT);
}

// set reference height
tx.setRefHeight(txProto.getRefHeight());

if (txProto.hasExchangeRate()) {
Protos.ExchangeRate exchangeRateProto = txProto.getExchangeRate();
Expand Down

0 comments on commit 65013a5

Please sign in to comment.