serialization: do not write optional fields with default value

This commit is contained in:
moneromooo-monero 2019-12-04 21:19:04 +00:00
parent 5f98b46d58
commit b595583f3d
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3
2 changed files with 4 additions and 2 deletions

View file

@ -169,7 +169,7 @@ class TransferTest():
assert e.subaddr_indices == [{'major': 0, 'minor': 0}]
assert e.address == '42ey1afDFnn4886T7196doS9GPMzexD9gXpsZJDwVjeRVdFCSoHnv7KPbBeGpzJBzHRCAs9UxqeoyFQMYbqSWYTfJJQAWDm'
assert e.double_spend_seen == False
assert e.confirmations == 0
assert not 'confirmations' in e or e.confirmations == 0
running_balances[0] -= 1000000000000 + fee
@ -282,7 +282,7 @@ class TransferTest():
assert e.subaddr_indices == [{'major': 0, 'minor': 0}]
assert e.address == '44Kbx4sJ7JDRDV5aAhLJzQCjDz2ViLRduE3ijDZu3osWKBjMGkV1XPk4pfDUMqt1Aiezvephdqm6YD19GKFD9ZcXVUTp6BW'
assert e.double_spend_seen == False
assert e.confirmations == 0
assert not 'confirmations' in e or e.confirmations == 0
assert e.amount == amount
assert e.fee == fee