Fix large balance issues.

This commit is contained in:
Cody Henthorne
2024-01-04 16:33:55 -05:00
committed by Alex Hart
parent 3554f82ea3
commit 5e8d324860
4 changed files with 28 additions and 27 deletions

View File

@@ -257,16 +257,11 @@ public final class LedgerReconcileTest {
if (mob.isNegative()) {
throw new AssertionError();
}
MobileCoinLedger.OwnedTXO.Builder builder = new MobileCoinLedger.OwnedTXO.Builder()
.receivedInBlock(receivedBlock)
.keyImage(keyImage)
.publicKey(publicKey);
try {
builder.amount(Uint64Util.bigIntegerToUInt64(mob.toPicoMobBigInteger()));
} catch (Uint64RangeException e) {
throw new AssertionError(e);
}
return builder;
return new MobileCoinLedger.OwnedTXO.Builder()
.amount(ByteString.of(mob.toPicoMobBigInteger().toByteArray()))
.receivedInBlock(receivedBlock)
.keyImage(keyImage)
.publicKey(publicKey);
}
private static Payment payment(String note, Money.MobileCoin valueAndDirection, Set<ByteString> keyImages, Set<ByteString> publicKeys) {