(b *legacy.Block, s *state.Snapshot)
| 168 | } |
| 169 | |
| 170 | func (c *Chain) setState(b *legacy.Block, s *state.Snapshot) { |
| 171 | c.state.cond.L.Lock() |
| 172 | defer c.state.cond.L.Unlock() |
| 173 | c.state.block = b |
| 174 | c.state.snapshot = s |
| 175 | if b != nil && b.Height > c.state.height { |
| 176 | c.state.height = b.Height |
| 177 | c.state.cond.Broadcast() |
| 178 | } |
| 179 | } |
| 180 | |
| 181 | // BlockSoonWaiter returns a channel that |
| 182 | // waits for the block at the given height, |
no outgoing calls
no test coverage detected