Browse Source

unidirectional channel

pull/981/head
Anton Kaliaev 7 years ago
parent
commit
3f02ab0ead
No known key found for this signature in database GPG Key ID: 7B6881D965918214
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      consensus/wal_generator.go

+ 3
- 2
consensus/wal_generator.go View File

@ -92,6 +92,7 @@ func WALWithNBlocks(numBlocks int) (data []byte, err error) {
wr.Flush()
return b.Bytes(), nil
case <-time.After(1 * time.Minute):
wr.Flush()
return b.Bytes(), fmt.Errorf("waited too long for tendermint to produce %d blocks (grep logs for `wal_generator`)", numBlocks)
}
}
@ -141,13 +142,13 @@ type byteBufferWAL struct {
enc *WALEncoder
stopped bool
heightToStop int64
signalWhenStopsTo chan struct{}
signalWhenStopsTo chan<- struct{}
}
// needed for determinism
var fixedTime, _ = time.Parse(time.RFC3339, "2017-01-02T15:04:05Z")
func newByteBufferWAL(enc *WALEncoder, nBlocks int64, signalStop chan struct{}) *byteBufferWAL {
func newByteBufferWAL(enc *WALEncoder, nBlocks int64, signalStop chan<- struct{}) *byteBufferWAL {
return &byteBufferWAL{
enc: enc,
heightToStop: nBlocks,


Loading…
Cancel
Save