Skip to content

Commit

Permalink
change file name
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouop0 committed May 23, 2024
1 parent b138708 commit 47bb32d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
6 changes: 3 additions & 3 deletions internal/svc/svc.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"github.com/b2network/b2committer/pkg/beacon"
"github.com/b2network/b2committer/pkg/client"
"github.com/b2network/b2committer/pkg/contract/op"
"github.com/b2network/b2committer/pkg/ds"
"github.com/b2network/b2committer/pkg/log"
"github.com/b2network/b2committer/pkg/store"
"github.com/b2network/b2committer/pkg/unisat"
"github.com/ethereum-optimism/optimism/op-service/sources"
"github.com/ethereum/go-ethereum/common"
Expand Down Expand Up @@ -38,7 +38,7 @@ type ServiceContext struct {
SyncedBlobBlockNumber int64
SyncedBlobBlockHash common.Hash
OpCommitterClient *b2node.OpCommitterClient
DecentralizedStore ds.DecentralizedStore
DecentralizedStore store.DecentralizedStore
UnisatHTTPClient *unisat.UstHTTPClient
}

Expand Down Expand Up @@ -121,7 +121,7 @@ func NewServiceContext(cfg *types.Config, bitcoinCfg *types.BitcoinRPCConfig, b2
log.Panicf("[svc] init arweave wallet panic: %s\n", err)
}

svc.DecentralizedStore = ds.NewArWeave(w, arClient)
svc.DecentralizedStore = store.NewArWeave(w, arClient)
}

return svc
Expand Down
6 changes: 1 addition & 5 deletions pkg/ds/ds.go → pkg/store/arweave.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ds
package store

import (
"strconv"
Expand All @@ -7,10 +7,6 @@ import (
"github.com/everFinance/goar/types"
)

type DecentralizedStore interface {
StoreDetailsOnChain(txs []byte, chainID int64, proposalID uint64) (string, error)
QueryDetailsByTxID(txID string) ([]byte, error)
}
type ArWeave struct {
Client *goar.Client
Wallet *goar.Wallet
Expand Down
2 changes: 1 addition & 1 deletion pkg/ds/ds_test.go → pkg/store/arweave_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ds
package store

import (
"fmt"
Expand Down
6 changes: 6 additions & 0 deletions pkg/store/store.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package store

type DecentralizedStore interface {
StoreDetailsOnChain(txs []byte, chainID int64, proposalID uint64) (string, error)
QueryDetailsByTxID(txID string) ([]byte, error)
}

0 comments on commit 47bb32d

Please sign in to comment.