Hacker News new | ask | show | jobs
by bvanheu 1592 days ago
I think dannyw meant something like this:

  # This function is defined by the system
  def validSignature(sig):
    return false

  # This function is defined by the system
  def isSignaturefromGuardian(sig):
    if sig.validator == "guardian":
      return true
    return false

  # A bug in the system compared both return values
  if validSignature(tx.sig) == signatureFromGuardian(tx.sig):
    approve()
```