mirror of
https://github.com/fluencelabs/tendermint
synced 2025-04-25 14:52:17 +00:00
unidirectional channel
This commit is contained in:
parent
99c58fc561
commit
3f02ab0ead
@ -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…
x
Reference in New Issue
Block a user