ipfs / go-graphsync

Initial Implementation Of GraphSync Wire Protocol
Other
100 stars 38 forks source link

QueryExecutor.executeQuery does not need to return code, #262

Closed hannahhoward closed 2 years ago

hannahhoward commented 2 years ago

currently the executeQuery method of the QueryExecutor returns a response status code: https://github.com/ipfs/go-graphsync/blob/main/responsemanager/queryexecutor.go#L87-L93

but it's promptly dropped in the only place it gets called: https://github.com/ipfs/go-graphsync/blob/main/responsemanager/queryexecutor.go#L75

remove this as a return value

Then in conjunction with https://github.com/ipfs/go-graphsync/issues/261 we should be able to significantly simplify the logic at the end of execute query (with the final network transaction)

rvagg commented 2 years ago

@hannahhoward I think this can be closed. Tagged version of what you're linking to: https://github.com/ipfs/go-graphsync/blob/v0.10.4/responsemanager/queryexecutor.go#L87-L93

Current version: https://github.com/ipfs/go-graphsync/blob/1697d47e3efcf4aefa43375a4c3ec44410a6f521/responsemanager/queryexecutor/queryexecutor.go#L119-L120

The graphsync.ResponseStatusCode has been removed and is no longer dropped. The err is still used.

rvagg commented 2 years ago

going to go ahead and close this one, I'm pretty sure it's done