(blkNum uint32, stateRoot common.Uint256)
| 400 | } |
| 401 | |
| 402 | func (self *Server) constructBlockSubmitMsg(blkNum uint32, stateRoot common.Uint256) (*blockSubmitMsg, error) { |
| 403 | submitSig, err := signature.Sign(self.account, stateRoot[:]) |
| 404 | if err != nil { |
| 405 | return nil, fmt.Errorf("submit failed to sign stateroot hash:%x, err: %s", stateRoot, err) |
| 406 | } |
| 407 | msg := &blockSubmitMsg{ |
| 408 | BlockStateRoot: stateRoot, |
| 409 | BlockNum: blkNum, |
| 410 | SubmitMsgSig: submitSig, |
| 411 | } |
| 412 | return msg, nil |
| 413 | } |
no test coverage detected