diff --git a/src/trezor/dispatcher.py b/src/trezor/dispatcher.py index a1381db4c..966918fd4 100644 --- a/src/trezor/dispatcher.py +++ b/src/trezor/dispatcher.py @@ -6,6 +6,8 @@ message_handlers = {} def register(mtype, handler): + if mtype in message_handlers: + raise Exception('Message wire type %s is already registered', mtype) message_handlers[mtype] = handler