Skip to content

u160 arithmetic #138

@aszepieniec

Description

@aszepieniec

We need this for block consensus programs, for the difficulty adjustment.

Needed operations:

  • comparision (less than)
  • addition
  • subtraction
  • multiplication of a u160 with a u32 (asserting no overflow)
  • multiplication of two u160s (asserting no overflow)
  • division (not sure we need this one but listed for completeness)

The compiler should be able to handle this as well through an array of 5 u32s.

Co-authored-by: @Sword-Smith

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions