FixedBN performs bound-checking in its constructor. Most of the operations return a new BN instance (not a FixedBN), and because they have not been overriden they wouldn't necessarily have the specified width. Does it make sense to override such operations to cast them to FixedBN and do a modulo afterwards if necessary? Or should users of the library take care of this?
FixedBN
performs bound-checking in its constructor. Most of the operations return a newBN
instance (not aFixedBN
), and because they have not been overriden they wouldn't necessarily have the specified width. Does it make sense to override such operations to cast them toFixedBN
and do a modulo afterwards if necessary? Or should users of the library take care of this?