@ -212,7 +212,7 @@ func (p *http) validatorSet(ctx context.Context, height *int64) (*types.Validato
// If we don't know the error then by default we return an unreliable provider error and
// If we don't know the error then by default we return an unreliable provider error and
// terminate the connection with the peer.
// terminate the connection with the peer.
return nil , provider . ErrUnreliableProvider { Reason : e . Error ( ) }
return nil , provider . ErrUnreliableProvider { Reason : e }
}
}
// update the total and increment the page index so we can fetch the
// update the total and increment the page index so we can fetch the
@ -268,7 +268,7 @@ func (p *http) signedHeader(ctx context.Context, height *int64) (*types.SignedHe
// If we don't know the error then by default we return an unreliable provider error and
// If we don't know the error then by default we return an unreliable provider error and
// terminate the connection with the peer.
// terminate the connection with the peer.
return nil , provider . ErrUnreliableProvider { Reason : e . Error ( ) }
return nil , provider . ErrUnreliableProvider { Reason : e }
}
}
}
}
return nil , p . noResponse ( )
return nil , p . noResponse ( )
@ -278,7 +278,7 @@ func (p *http) noResponse() error {
p . noResponseCount ++
p . noResponseCount ++
if p . noResponseCount > p . noResponseThreshold {
if p . noResponseCount > p . noResponseThreshold {
return provider . ErrUnreliableProvider {
return provider . ErrUnreliableProvider {
Reason : fmt . Sprint f( "failed to respond after %d attempts" , p . noResponseCount ) ,
Reason : fmt . Error f( "failed to respond after %d attempts" , p . noResponseCount ) ,
}
}
}
}
return provider . ErrNoResponse
return provider . ErrNoResponse
@ -288,7 +288,7 @@ func (p *http) noBlock(e error) error {
p . noBlockCount ++
p . noBlockCount ++
if p . noBlockCount > p . noBlockThreshold {
if p . noBlockCount > p . noBlockThreshold {
return provider . ErrUnreliableProvider {
return provider . ErrUnreliableProvider {
Reason : fmt . Sprint f( "failed to provide a block after %d attempts" , p . noBlockCount ) ,
Reason : fmt . Error f( "failed to provide a block after %d attempts" , p . noBlockCount ) ,
}
}
}
}
return e
return e