IsValidDoubleSigner() checks if the double signer is valid at a certain double sign height
(rootChainId, rootHeight uint64, address []byte)
| 233 | |
| 234 | // IsValidDoubleSigner() checks if the double signer is valid at a certain double sign height |
| 235 | func (c *Controller) IsValidDoubleSigner(rootChainId, rootHeight uint64, address []byte) bool { |
| 236 | // do a remote call to the root chain to see if the double signer is valid |
| 237 | isValidDoubleSigner, err := c.RCManager.IsValidDoubleSigner(rootChainId, rootHeight, lib.BytesToString(address)) |
| 238 | // if an error occurred during the remote call |
| 239 | if err != nil { |
| 240 | // log the error |
| 241 | c.log.Errorf("IsValidDoubleSigner failed with error: %s", err.Error()) |
| 242 | // return is not a valid double signer for safety |
| 243 | return false |
| 244 | } |
| 245 | // return the result from the remote call |
| 246 | return *isValidDoubleSigner |
| 247 | } |
| 248 | |
| 249 | // PLUGIN CALLS BELOW |
| 250 |
nothing calls this directly
no test coverage detected