forked from cosmos/ibc-go
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: handling ErrNamespaceNotFound for node v0.10.0 (cosmos#953)
We have made a breaking change in node v0.10.0 regarding data requests. celestiaorg/celestia-node@62a0b97 Previously, a "data not found" meant both "the node failed to retrieve that data, please retry" as well as "the node retrieved the data successfully, but your namespace is not included in the data". We have split these errors, so now we have an `ErrNamespaceNotFound` which indicates a successful request for empty data. I have no idea how to test rollkit so would love some help on getting that set up --------- Co-authored-by: Ganesha Upadhyaya <gupadhyaya@Ganeshas-MacBook-Pro-2.local>
- Loading branch information
1 parent
5766a91
commit 784a455
Showing
3 changed files
with
55 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package celestia | ||
|
||
import ( | ||
"errors" | ||
"testing" | ||
|
||
"github.com/stretchr/testify/assert" | ||
|
||
"github.com/rollkit/rollkit/da" | ||
) | ||
|
||
func TestDataRequestErrorToStatus(t *testing.T) { | ||
assert := assert.New(t) | ||
assert.Equal(da.StatusSuccess, dataRequestErrorToStatus(da.ErrNamespaceNotFound)) | ||
assert.Equal(da.StatusNotFound, dataRequestErrorToStatus(da.ErrDataNotFound)) | ||
assert.Equal(da.StatusNotFound, dataRequestErrorToStatus(da.ErrEDSNotFound)) | ||
assert.Equal(da.StatusError, dataRequestErrorToStatus(errors.New("some random error"))) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters