MCPcopy Create free account
hub / github.com/DNAProject/DNA / constructBlockSubmitMsg

Method constructBlockSubmitMsg

consensus/vbft/msg_builder.go:402–413  ·  view source on GitHub ↗
(blkNum uint32, stateRoot common.Uint256)

Source from the content-addressed store, hash-verified

400}
401
402func (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}

Callers 1

setBlockSealedMethod · 0.80

Calls 2

SignFunction · 0.92
ErrorfMethod · 0.80

Tested by

no test coverage detected