(account *account.Account, msg ConsensusMsg)
| 44 | ) |
| 45 | |
| 46 | func SignMsg(account *account.Account, msg ConsensusMsg) ([]byte, error) { |
| 47 | |
| 48 | data, err := msg.Serialize() |
| 49 | if err != nil { |
| 50 | return nil, fmt.Errorf("failed to marshal msg when signing: %s", err) |
| 51 | } |
| 52 | |
| 53 | return signature.Sign(account, data) |
| 54 | } |
| 55 | |
| 56 | func hashData(data []byte) common.Uint256 { |
| 57 | t := sha256.Sum256(data) |