Skip to content

Commit

Permalink
Converted bandwidth amount to BIGINT type
Browse files Browse the repository at this point in the history
  • Loading branch information
devos50 committed Oct 28, 2020
1 parent f55a6ca commit ada27e4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ class BandwidthTransaction(db.Entity):
public_key_b = Required(bytes, index=True)
signature_a = Required(bytes)
signature_b = Required(bytes)
amount = Required(int)
amount = Required(int, size=64)
timestamp = Required(int, size=64)
PrimaryKey(sequence_number, public_key_a, public_key_b)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,15 @@ def test_get_latest_transaction(bandwidth_db):
assert tx2.amount == 3000


@db_session
def test_store_large_transaction(bandwidth_db):
large_tx = BandwidthTransactionData(1, b"a", b"b", EMPTY_SIGNATURE, EMPTY_SIGNATURE, 1024 * 1024 * 1024 * 3)
bandwidth_db.BandwidthTransaction.insert(large_tx)

latest_tx = bandwidth_db.get_latest_transaction(b"a", b"b")
assert latest_tx


@pytest.mark.asyncio
async def test_totals(bandwidth_db):
with db_session:
Expand Down

0 comments on commit ada27e4

Please sign in to comment.