Commit 339d2a98 authored by Juan Batiz-Benet's avatar Juan Batiz-Benet

merkledag: LONG timeout on Get

we shouldn't use an arbitrary timeout here. since Get
doesnt take in a context yet, we give a large upper bound.
think of an http request. we want it to go on as long as
the client requests it.
parent 2c739b6c
......@@ -229,7 +229,11 @@ func (n *dagService) Get(k u.Key) (*Node, error) {
return nil, fmt.Errorf("dagService is nil")
}
ctx, _ := context.WithTimeout(context.TODO(), time.Second*5)
ctx, _ := context.WithTimeout(context.TODO(), time.Minute)
// we shouldn't use an arbitrary timeout here.
// since Get doesnt take in a context yet, we give a large upper bound.
// think of an http request. we want it to go on as long as the client requests it.
b, err := n.Blocks.GetBlock(ctx, k)
if err != nil {
return nil, err
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment