supress the exception printed in cli wallet when keys are not imported #239

Closed
opened 2022-01-11 16:37:51 +00:00 by prandnum · 5 comments
prandnum commented 2022-01-11 16:37:51 +00:00 (Migrated from gitlab.com)

Can we disable the printing of the exception in the terminal?

None (Current behavior)

unlocked >>>  get_account_history ppuser01 100
 get_account_history ppuser01 100
1882953ms th_a       wallet.cpp:4208               operator()           ] Error when decrypting memo: 10 assert_exception: Assert Exception
wallet._keys.count(op.memo->to) || wallet._keys.count(op.memo->from): Memo is encrypted to a key TEST4zooq2yQiYs2xZLFgZPdkcxQLdsFxLEanz6fWi5SWHo92kyrht or TEST84BsX7xGKuDAwRKqinSK2mRZP5Yx4HPBm5sCdLE9PWYFPStSmh not in this wallet.
    {"to":"TEST4zooq2yQiYs2xZLFgZPdkcxQLdsFxLEanz6fWi5SWHo92kyrht","from":"TEST84BsX7xGKuDAwRKqinSK2mRZP5Yx4HPBm5sCdLE9PWYFPStSmh"}
    th_a  wallet.cpp:4194 operator()
1882956ms th_a       wallet.cpp:4208               operator()           ] Error when decrypting memo: 10 assert_exception: Assert Exception
wallet._keys.count(op.memo->to) || wallet._keys.count(op.memo->from): Memo is encrypted to a key TEST4zooq2yQiYs2xZLFgZPdkcxQLdsFxLEanz6fWi5SWHo92kyrht or TEST84BsX7xGKuDAwRKqinSK2mRZP5Yx4HPBm5sCdLE9PWYFPStSmh not in this wallet.
    {"to":"TEST4zooq2yQiYs2xZLFgZPdkcxQLdsFxLEanz6fWi5SWHo92kyrht","from":"TEST84BsX7xGKuDAwRKqinSK2mRZP5Yx4HPBm5sCdLE9PWYFPStSmh"}
    th_a  wallet.cpp:4194 operator()
1882974ms th_a       wallet.cpp:4208               operator()           ] Error when decrypting memo: 10 assert_exception: Assert Exception
wallet._keys.count(op.memo->to) || wallet._keys.count(op.memo->from): Memo is encrypted to a key TEST4zooq2yQiYs2xZLFgZPdkcxQLdsFxLEanz6fWi5SWHo92kyrht or TEST84BsX7xGKuDAwRKqinSK2mRZP5Yx4HPBm5sCdLE9PWYFPStSmh not in this wallet.
    {"to":"TEST4zooq2yQiYs2xZLFgZPdkcxQLdsFxLEanz6fWi5SWHo92kyrht","from":"TEST84BsX7xGKuDAwRKqinSK2mRZP5Yx4HPBm5sCdLE9PWYFPStSmh"}
    th_a  wallet.cpp:4194 operator()
1882979ms th_a       wallet.cpp:4208               operator()           ] Error when decrypting memo: 10 assert_exception: Assert Exception
wallet._keys.count(op.memo->to) || wallet._keys.count(op.memo->from): Memo is encrypted to a key TEST4zooq2yQiYs2xZLFgZPdkcxQLdsFxLEanz6fWi5SWHo92kyrht or TEST84BsX7xGKuDAwRKqinSK2mRZP5Yx4HPBm5sCdLE9PWYFPStSmh not in this wallet.
    {"to":"TEST4zooq2yQiYs2xZLFgZPdkcxQLdsFxLEanz6fWi5SWHo92kyrht","from":"TEST84BsX7xGKuDAwRKqinSK2mRZP5Yx4HPBm5sCdLE9PWYFPStSmh"}
    th_a  wallet.cpp:4194 operator()
2021-12-30T19:41:24 Transfer 100 TEST from ppuser01 to ppuser02 -- Memo:  # Should not be encrypted   (Fee: 21.03515 TEST)
2021-12-30T19:41:24 Transfer 100 TEST from ppuser01 to ppuser02 -- could not decrypt memo   (Fee: 21.05468 TEST)
2021-12-30T19:41:24 Transfer 100 TEST from ppuser01 to ppuser02 -- could not decrypt memo   (Fee: 21.05468 TEST)
2021-12-30T19:41:24 Transfer 100 TEST from ppuser01 to ppuser02 -- Memo: Should not be encrypted   (Fee: 21.00585 TEST)
2021-12-30T19:37:39 Transfer 10000 TEST from nathan to ppuser01 -- Memo: init   (Fee: 20.82031 TEST)
2021-12-30T19:37:39 Create Account 'ppuser01'   (Fee: 5.14355 TEST)

unlocked >>>

None (Expected behavior)

unlocked >>>  get_account_history ppuser01 100
 get_account_history ppuser01 100

2021-12-30T19:41:24 Transfer 100 TEST from ppuser01 to ppuser02 -- Memo:  # Should not be encrypted   (Fee: 21.03515 TEST)
2021-12-30T19:41:24 Transfer 100 TEST from ppuser01 to ppuser02 -- could not decrypt memo   (Fee: 21.05468 TEST)
2021-12-30T19:41:24 Transfer 100 TEST from ppuser01 to ppuser02 -- could not decrypt memo   (Fee: 21.05468 TEST)
2021-12-30T19:41:24 Transfer 100 TEST from ppuser01 to ppuser02 -- Memo: Should not be encrypted   (Fee: 21.00585 TEST)
2021-12-30T19:37:39 Transfer 10000 TEST from nathan to ppuser01 -- Memo: init   (Fee: 20.82031 TEST)
2021-12-30T19:37:39 Create Account 'ppuser01'   (Fee: 5.14355 TEST)

unlocked >>>
Can we disable the printing of the exception in the terminal? **None (Current behavior)** ``` unlocked >>> get_account_history ppuser01 100 get_account_history ppuser01 100 1882953ms th_a wallet.cpp:4208 operator() ] Error when decrypting memo: 10 assert_exception: Assert Exception wallet._keys.count(op.memo->to) || wallet._keys.count(op.memo->from): Memo is encrypted to a key TEST4zooq2yQiYs2xZLFgZPdkcxQLdsFxLEanz6fWi5SWHo92kyrht or TEST84BsX7xGKuDAwRKqinSK2mRZP5Yx4HPBm5sCdLE9PWYFPStSmh not in this wallet. {"to":"TEST4zooq2yQiYs2xZLFgZPdkcxQLdsFxLEanz6fWi5SWHo92kyrht","from":"TEST84BsX7xGKuDAwRKqinSK2mRZP5Yx4HPBm5sCdLE9PWYFPStSmh"} th_a wallet.cpp:4194 operator() 1882956ms th_a wallet.cpp:4208 operator() ] Error when decrypting memo: 10 assert_exception: Assert Exception wallet._keys.count(op.memo->to) || wallet._keys.count(op.memo->from): Memo is encrypted to a key TEST4zooq2yQiYs2xZLFgZPdkcxQLdsFxLEanz6fWi5SWHo92kyrht or TEST84BsX7xGKuDAwRKqinSK2mRZP5Yx4HPBm5sCdLE9PWYFPStSmh not in this wallet. {"to":"TEST4zooq2yQiYs2xZLFgZPdkcxQLdsFxLEanz6fWi5SWHo92kyrht","from":"TEST84BsX7xGKuDAwRKqinSK2mRZP5Yx4HPBm5sCdLE9PWYFPStSmh"} th_a wallet.cpp:4194 operator() 1882974ms th_a wallet.cpp:4208 operator() ] Error when decrypting memo: 10 assert_exception: Assert Exception wallet._keys.count(op.memo->to) || wallet._keys.count(op.memo->from): Memo is encrypted to a key TEST4zooq2yQiYs2xZLFgZPdkcxQLdsFxLEanz6fWi5SWHo92kyrht or TEST84BsX7xGKuDAwRKqinSK2mRZP5Yx4HPBm5sCdLE9PWYFPStSmh not in this wallet. {"to":"TEST4zooq2yQiYs2xZLFgZPdkcxQLdsFxLEanz6fWi5SWHo92kyrht","from":"TEST84BsX7xGKuDAwRKqinSK2mRZP5Yx4HPBm5sCdLE9PWYFPStSmh"} th_a wallet.cpp:4194 operator() 1882979ms th_a wallet.cpp:4208 operator() ] Error when decrypting memo: 10 assert_exception: Assert Exception wallet._keys.count(op.memo->to) || wallet._keys.count(op.memo->from): Memo is encrypted to a key TEST4zooq2yQiYs2xZLFgZPdkcxQLdsFxLEanz6fWi5SWHo92kyrht or TEST84BsX7xGKuDAwRKqinSK2mRZP5Yx4HPBm5sCdLE9PWYFPStSmh not in this wallet. {"to":"TEST4zooq2yQiYs2xZLFgZPdkcxQLdsFxLEanz6fWi5SWHo92kyrht","from":"TEST84BsX7xGKuDAwRKqinSK2mRZP5Yx4HPBm5sCdLE9PWYFPStSmh"} th_a wallet.cpp:4194 operator() 2021-12-30T19:41:24 Transfer 100 TEST from ppuser01 to ppuser02 -- Memo: # Should not be encrypted (Fee: 21.03515 TEST) 2021-12-30T19:41:24 Transfer 100 TEST from ppuser01 to ppuser02 -- could not decrypt memo (Fee: 21.05468 TEST) 2021-12-30T19:41:24 Transfer 100 TEST from ppuser01 to ppuser02 -- could not decrypt memo (Fee: 21.05468 TEST) 2021-12-30T19:41:24 Transfer 100 TEST from ppuser01 to ppuser02 -- Memo: Should not be encrypted (Fee: 21.00585 TEST) 2021-12-30T19:37:39 Transfer 10000 TEST from nathan to ppuser01 -- Memo: init (Fee: 20.82031 TEST) 2021-12-30T19:37:39 Create Account 'ppuser01' (Fee: 5.14355 TEST) unlocked >>> ``` **None (Expected behavior)** ``` unlocked >>> get_account_history ppuser01 100 get_account_history ppuser01 100 2021-12-30T19:41:24 Transfer 100 TEST from ppuser01 to ppuser02 -- Memo: # Should not be encrypted (Fee: 21.03515 TEST) 2021-12-30T19:41:24 Transfer 100 TEST from ppuser01 to ppuser02 -- could not decrypt memo (Fee: 21.05468 TEST) 2021-12-30T19:41:24 Transfer 100 TEST from ppuser01 to ppuser02 -- could not decrypt memo (Fee: 21.05468 TEST) 2021-12-30T19:41:24 Transfer 100 TEST from ppuser01 to ppuser02 -- Memo: Should not be encrypted (Fee: 21.00585 TEST) 2021-12-30T19:37:39 Transfer 10000 TEST from nathan to ppuser01 -- Memo: init (Fee: 20.82031 TEST) 2021-12-30T19:37:39 Create Account 'ppuser01' (Fee: 5.14355 TEST) unlocked >>> ```
prandnum commented 2022-01-11 16:37:51 +00:00 (Migrated from gitlab.com)

assigned to @serkixenos

assigned to @serkixenos
prandnum commented 2022-01-11 16:38:12 +00:00 (Migrated from gitlab.com)

@bobinson @serkixenos

CC: @hbelakon

@bobinson @serkixenos CC: @hbelakon
prandnum commented 2022-01-11 16:39:01 +00:00 (Migrated from gitlab.com)

mentioned in issue #232

mentioned in issue #232
serkixenos commented 2022-01-17 17:18:44 +00:00 (Migrated from gitlab.com)

Wont do, because the exception provide exact explanation of why the memo is unreadable (keys needed for decryption are not present in the wallet).

Wont do, because the exception provide exact explanation of why the memo is unreadable (keys needed for decryption are not present in the wallet).
serkixenos (Migrated from gitlab.com) closed this issue 2022-01-17 17:18:44 +00:00
hbelakon commented 2022-01-28 04:28:32 +00:00 (Migrated from gitlab.com)

Whart Epic is that?

Whart Epic is that?
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Peerplays_Blockchain/peerplays_migrated#239
No description provided.