This commit is contained in:
Jack Nelson 2022-04-10 20:31:09 -04:00
parent 30dc7c0ab4
commit d7b91295b5
No known key found for this signature in database
GPG key ID: BD4138A0462E6AE3

View file

@ -85,9 +85,17 @@ class TestCoinSelection:
@pytest.mark.asyncio
async def test_coin_selection_with_dust(self, a_hash: bytes32) -> None:
spendable_amount = uint128(5000000000000 + 10000)
coin_list: List[WalletCoinRecord] = [WalletCoinRecord(Coin(a_hash, a_hash, uint64(5000000000000)), uint32(1), uint32(1), False, True, WalletType(0), 1)]
coin_list: List[WalletCoinRecord] = [
WalletCoinRecord(
Coin(a_hash, a_hash, uint64(5000000000000)), uint32(1), uint32(1), False, True, WalletType(0), 1
)
]
for i in range(10000):
coin_list.append(WalletCoinRecord(Coin(a_hash, std_hash(i), uint64(1)), uint32(1), uint32(1), False, True, WalletType(0), 1))
coin_list.append(
WalletCoinRecord(
Coin(a_hash, std_hash(i), uint64(1)), uint32(1), uint32(1), False, True, WalletType(0), 1
)
)
# make sure coins are not identical.
for target_amount in [10000, 9999]: # select the first 100 values
result: Set[Coin] = await select_coins(