conflux-rust icon indicating copy to clipboard operation
conflux-rust copied to clipboard

Error from `as_account()` is not correctly handled.

Open ChenxingLi opened this issue 4 years ago • 0 comments

as_account() will throw an error in case the address of an overlay account is invalid. But the current code treats it as db error and propogates it up. There may cause some problems @yangzhe1990.

Also, I don't think it is a good idea to check address validity here. as_account() only extracts the basic component of an account. It should always success. It's better to put such logic when create an overlay account or outside interact with overlay account.

ChenxingLi avatar Aug 08 '20 08:08 ChenxingLi