1
0

add sanity checks we don't sign tx including dummy addr

Somewhat a follow-up to 649ce979ab.

This adds some safety belts so we don't accidentally sign a tx that
contains a dummy address.
Specifically we check that tx does not contain output for dummy addr:
- in wallet.sign_transaction
- in network.broadcast_transaction

The second one is perhaps redundant, but I think it does not hurt.
This commit is contained in:
SomberNight
2023-09-16 04:36:08 +00:00
parent 956b455954
commit 4c63d8729b
16 changed files with 94 additions and 41 deletions

View File

@@ -2003,6 +2003,14 @@ class nullcontext:
pass
class classproperty(property):
"""~read-only class-level @property
from https://stackoverflow.com/a/13624858 by denis-ryzhkov
"""
def __get__(self, owner_self, owner_cls):
return self.fget(owner_cls)
def get_running_loop() -> Optional[asyncio.AbstractEventLoop]:
"""Returns the asyncio event loop that is *running in this thread*, if any."""
try: