(blockNum uint32)
| 399 | } |
| 400 | |
| 401 | func (pool *BlockPool) committedForBlock(blockNum uint32) bool { |
| 402 | pool.lock.RLock() |
| 403 | defer pool.lock.RUnlock() |
| 404 | |
| 405 | // check if has committed for the block |
| 406 | if pool.chainStore.GetChainedBlockNum() >= blockNum { |
| 407 | return true |
| 408 | } |
| 409 | |
| 410 | c := pool.candidateBlocks[blockNum] |
| 411 | if c == nil { |
| 412 | return false |
| 413 | } |
| 414 | |
| 415 | return c.CommittedProposal != nil || c.CommittedEmptyProposal != nil |
| 416 | } |
| 417 | |
| 418 | func (pool *BlockPool) setProposalCommitted(proposal *blockProposalMsg, forEmpty bool) error { |
| 419 | pool.lock.Lock() |
no test coverage detected