File tree Expand file tree Collapse file tree 1 file changed +0
-21
lines changed
Expand file tree Collapse file tree 1 file changed +0
-21
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,6 @@ package ttx
99import (
1010 "context"
1111 "encoding/base64"
12- "time"
1312
1413 "github.com/hyperledger-labs/fabric-smart-client/platform/view/view"
1514 "github.com/pkg/errors"
@@ -128,23 +127,3 @@ func (s *localSession) Receive() <-chan *view.Message {
128127func (s * localSession ) Close () {
129128 s .info .Closed = true
130129}
131-
132- func ReadMessage (session view.Session , timeout time.Duration ) ([]byte , error ) {
133- timer := time .NewTimer (timeout )
134- defer timer .Stop ()
135-
136- ch := session .Receive ()
137- select {
138- case msg := <- ch :
139- if msg == nil {
140- return nil , errors .New ("received nil tx" )
141- }
142- if msg .Status == view .ERROR {
143- return nil , errors .New (string (msg .Payload ))
144- }
145- return msg .Payload , nil
146- case <- timer .C :
147- err := errors .New ("timeout reached" )
148- return nil , err
149- }
150- }
You can’t perform that action at this time.
0 commit comments