Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Jayashsatolia403 committed Feb 7, 2025
1 parent 4633e01 commit 5b52674
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions code/go/0chain.net/blobbercore/handler/protocol.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package handler
import (
"context"
"errors"
"github.com/0chain/blobber/code/go/0chain.net/blobbercore/datastore"
"sync"

"github.com/0chain/gosdk/core/client"
Expand Down Expand Up @@ -76,10 +77,10 @@ func getStorageNode() (*transaction.StorageNode, error) {

// RegisterBlobber register blobber if it is not registered yet
func RegisterBlobber(ctx context.Context) error {
//err := datastore.GetStore().WithNewTransaction(func(ctx context.Context) error {
// _, e := config.ReloadFromChain(ctx, datastore.GetStore().GetDB())
// return e
//})
err := datastore.GetStore().WithNewTransaction(func(ctx context.Context) error {
_, e := config.ReloadFromChain(ctx, datastore.GetStore().GetDB())
return e
})

txn, err := sendSmartContractBlobberAdd()
if err != nil {
Expand Down Expand Up @@ -117,10 +118,6 @@ func sendSmartContractBlobberAdd() (*coreTxn.Transaction, error) {
return nil, err
}

logging.Logger.Info("Jayash Storage Node", zap.Any("sn", sn))

panic("implement me")

_, _, _, txn, err := coreTxn.SmartContractTxn(transaction.STORAGE_CONTRACT_ADDRESS, coreTxn.SmartContractTxnData{
Name: transaction.ADD_BLOBBER_SC_NAME,
InputArgs: sn,
Expand Down

0 comments on commit 5b52674

Please sign in to comment.