Skip to content

Commit

Permalink
refactor(share/p2p/shrexeds): Increase ODS write deadline to block ti…
Browse files Browse the repository at this point in the history
…me and add hash to log (celestiaorg#1816)

Increases ODS write deadline to block time and adds the hash to failure
log
  • Loading branch information
renaynay authored Feb 27, 2023
1 parent 190df0b commit 0b81f59
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion share/p2p/shrexeds/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ type Parameters struct {
func DefaultParameters() *Parameters {
return &Parameters{
ReadDeadline: time.Minute,
WriteDeadline: time.Second * 5,
WriteDeadline: time.Second * 30, // based on block time
ReadCARDeadline: time.Minute,
BufferSize: 32 * 1024,
concurrencyLimit: 10,
Expand Down
2 changes: 1 addition & 1 deletion share/p2p/shrexeds/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ func (s *Server) handleStream(stream network.Stream) {
// start streaming the ODS to the client
err = s.writeODS(edsReader, stream)
if err != nil {
log.Errorw("server: writing ods to stream", "err", err)
log.Errorw("server: writing ods to stream", "hash", hash.String(), "err", err)
stream.Reset() //nolint:errcheck
return
}
Expand Down

0 comments on commit 0b81f59

Please sign in to comment.