Skip to content

Commit ee59a92

Browse files
committed
rename for clarity
1 parent 421b359 commit ee59a92

7 files changed

Lines changed: 17 additions & 17 deletions

File tree

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ import (
99
"time"
1010

1111
"github.com/celestiaorg/go-square/v3/share"
12+
"github.com/evstack/ev-node/da/newjsonrpc"
1213
"github.com/rs/zerolog"
1314

14-
celestia "github.com/evstack/ev-node/da/celestia"
1515
"github.com/evstack/ev-node/pkg/blob"
1616
)
1717

@@ -28,7 +28,7 @@ var (
2828

2929
// CelestiaBlobConfig contains configuration for the Celestia blob client.
3030
type CelestiaBlobConfig struct {
31-
Celestia *celestia.Client
31+
Celestia *newjsonrpc.Client
3232
Logger zerolog.Logger
3333
DefaultTimeout time.Duration
3434
Namespace string
@@ -38,7 +38,7 @@ type CelestiaBlobConfig struct {
3838

3939
// CelestiaBlobClient wraps the blob RPC with namespace handling and error mapping.
4040
type CelestiaBlobClient struct {
41-
blobAPI *celestia.BlobAPI
41+
blobAPI *newjsonrpc.BlobAPI
4242
logger zerolog.Logger
4343
defaultTimeout time.Duration
4444
namespaceBz []byte
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ import (
77
"testing"
88

99
"github.com/celestiaorg/go-square/v3/share"
10+
"github.com/evstack/ev-node/da/newjsonrpc"
1011
"github.com/rs/zerolog"
1112
"github.com/stretchr/testify/assert"
1213
"github.com/stretchr/testify/require"
1314

14-
celestia "github.com/evstack/ev-node/da/celestia"
1515
"github.com/evstack/ev-node/pkg/blob"
1616
)
1717

@@ -21,7 +21,7 @@ type mockCelestiaBlobAPI struct {
2121
blobs []*blob.Blob
2222
proof *blob.Proof
2323
included bool
24-
commitProof *celestia.CommitmentProof
24+
commitProof *newjsonrpc.CommitmentProof
2525
}
2626

2727
func (m *mockCelestiaBlobAPI) Submit(ctx context.Context, blobs []*blob.Blob, opts *blob.SubmitOptions) (uint64, error) {
@@ -40,25 +40,25 @@ func (m *mockCelestiaBlobAPI) Included(ctx context.Context, height uint64, names
4040
return m.included, m.submitErr
4141
}
4242

43-
func (m *mockCelestiaBlobAPI) GetCommitmentProof(ctx context.Context, height uint64, namespace share.Namespace, shareCommitment []byte) (*celestia.CommitmentProof, error) {
43+
func (m *mockCelestiaBlobAPI) GetCommitmentProof(ctx context.Context, height uint64, namespace share.Namespace, shareCommitment []byte) (*newjsonrpc.CommitmentProof, error) {
4444
return m.commitProof, m.submitErr
4545
}
4646

47-
func (m *mockCelestiaBlobAPI) Subscribe(ctx context.Context, namespace share.Namespace) (<-chan *celestia.SubscriptionResponse, error) {
48-
ch := make(chan *celestia.SubscriptionResponse)
47+
func (m *mockCelestiaBlobAPI) Subscribe(ctx context.Context, namespace share.Namespace) (<-chan *newjsonrpc.SubscriptionResponse, error) {
48+
ch := make(chan *newjsonrpc.SubscriptionResponse)
4949
close(ch)
5050
return ch, nil
5151
}
5252

53-
func makeCelestiaClient(m *mockCelestiaBlobAPI) *celestia.Client {
54-
var api celestia.BlobAPI
53+
func makeCelestiaClient(m *mockCelestiaBlobAPI) *newjsonrpc.Client {
54+
var api newjsonrpc.BlobAPI
5555
api.Internal.Submit = m.Submit
5656
api.Internal.GetAll = m.GetAll
5757
api.Internal.GetProof = m.GetProof
5858
api.Internal.Included = m.Included
5959
api.Internal.GetCommitmentProof = m.GetCommitmentProof
6060
api.Internal.Subscribe = m.Subscribe
61-
return &celestia.Client{Blob: api}
61+
return &newjsonrpc.Client{Blob: api}
6262
}
6363

6464
func TestCelestiaClient_Submit_ErrorMapping(t *testing.T) {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package celestia
1+
package newjsonrpc
22

33
import (
44
"context"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package celestia
1+
package newjsonrpc
22

33
import (
44
"context"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package celestia
1+
package newjsonrpc
22

33
import (
44
"context"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package celestia
1+
package newjsonrpc
22

33
import "github.com/evstack/ev-node/pkg/blob"
44

test/e2e/integration/celestia_client_integration_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ import (
2424
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
2525
govmodule "github.com/cosmos/cosmos-sdk/x/gov"
2626
"github.com/cosmos/ibc-go/v8/modules/apps/transfer"
27+
"github.com/evstack/ev-node/da/newjsonrpc"
2728
"github.com/stretchr/testify/require"
2829

2930
sdkmath "cosmossdk.io/math"
30-
"github.com/evstack/ev-node/da/celestia"
3131
"github.com/evstack/ev-node/pkg/blob"
3232
)
3333

@@ -207,7 +207,7 @@ func TestClient_SubmitAndGetBlobAgainstRealNode(t *testing.T) {
207207
})
208208
require.NoError(t, err, "bridge RPC reachable")
209209

210-
client, err := celestia.NewClient(ctx, rpcAddr, "", "")
210+
client, err := newjsonrpc.NewClient(ctx, rpcAddr, "", "")
211211
require.NoError(t, err, "new da client")
212212
t.Cleanup(client.Close)
213213

0 commit comments

Comments
 (0)