go-perun icon indicating copy to clipboard operation
go-perun copied to clipboard

Code bloat due to `err = cherrors.CheckIsChainNotReachableError(err)`

Open matthiasgeihs opened this issue 3 years ago • 0 comments

Having err = cherrors.CheckIsChainNotReachableError(err) in so many places is not nice. It bloats the code size.

Could we do something like defer func(){err = cherrors.CheckIsChainNotReachableError(err)}()?

Even cleaner would be to wrap the contract backend and check there.

Originally posted by @matthiasgeihs in https://github.com/hyperledger-labs/go-perun/pull/101#discussion_r690246792

matthiasgeihs avatar Aug 18 '21 13:08 matthiasgeihs