Angus Pearson

Results 42 comments of Angus Pearson

@theStack ```python msg = 'Mint Error: invalid split amount: -1' async def assert_err(f, msg): """Compute f() and expect an error message 'msg'.""" try: await f except Exception as exc: >...

> Do any directories have to be cleaned? I think `~/.cashu/test_wallet` does, or at least sometimes :laughing:

I've used this testing library [VCR](https://vcrpy.readthedocs.io/en/latest/index.html) a lot before, it's great for testing things that need to make requests where it's a pain to set up all the things you...

> I'm not sure that the shortness of ordinal numbers is much of an advantage I'd tend to agree, I'd prefer just the txid because it also has the potentially...

> the receiver could verify the TxId against the one that was shared with them when the DID was shared You could, but that's starting to feel hacky. Also would...

> Not sure if that is worth addressing since it's so rare but perhaps simply adding a comment that the test might fail every 2^48 runs is good? I think...

> Would it be difficult to make the test deterministic? Yes, the straightforward way would be to replace the `InsecureRand256()` with fixed hashes that don't result in transaction short IDs...

Pushed 09b90c6 which makes the tests deterministic by using predictable 'random' numbers. I've jsut picked them, there's nothing particularly special about their values. Using this to reproduce the issue @dergoegge...

@tessus I think the intent of the `maxmemory` is more towards setting a maximum dataset size, so that it is easy to reason about if used as a cache or...

> In your example you talk about server and client memory. Client memory should not be added to the server's peak memory, because the client uses its own memory pool....